同一个数据库: 表格A:
int userId
decimal amount表格B:
int userId
decimal amount
datetime createdDate如何复制表格A的所有数据到表格B, 并使 createDate=GetDate() ?
int userId
decimal amount表格B:
int userId
decimal amount
datetime createdDate如何复制表格A的所有数据到表格B, 并使 createDate=GetDate() ?
select userid,amount,getdate()
from A
INSERT INTO B SELECT userId, amount, GetDate() FROM A
select userId,amount,getdate() from 表格A