Transfer data from table in SQL Server [closed]
I have a table with columns (date_to, bil_id, member_pay, yot开发者_Python百科)
I need to transfer the data from columns (bil_id, member_pay, yot)
to another table with columns (bil_id, member_pay, yot, bil_id, date_of_)
and then delete the data from the first table.
How can I do it?
insert into T2(bil_id, member_pay, yot, date_of_to)
select bil_id, member_pay, yot, getdate()
from T1;
delete from T1;
精彩评论