在SQL中如何将T1表的1条记录内容完全覆盖T2表的1条记录列名完全相同 delete from T2insert into T2select * from T1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 先删除T2表的这条记录.然后插入insert into t2 select * from t1 where ... 3Q再弱弱的问一下 必须要DELETE 一下吗? update T2 set col=t1.col,col2=t1.col2 ....... from t1 where t2.id=t1.id 否则,一个个字段对应UPDATE.update t2set col1 = t1.col1, col2 = t1.col2, ... coln = t1.colnfrom t2 , t1where t2.id = t1.id 晕 发现一个问题!~~~~~我不能 DELETE 因为我的ID1 是自动增长字段 如果更改后 会牵连起他几个程序...! 否则,一个个字段对应UPDATE.update t2set col1 = t1.col1, col2 = t1.col2, ... coln = t1.colnfrom t2 , t1where t2.id = t1.id update T2set col1 = T1.col1, col2 = T1.col2 ...from T1where T1.colPK = T2.colPK 可以应用 ACCESS的数据库麻? 怎么在语句里标识一个表的字段? SQL数据文件过大 如何转变SQL的日期格式 如何根据时间写一个存储过程 这个的数据库约束该怎么写? 困扰了一周的问题,请求大家帮助,SQL Server服务器问题,见内容,谢谢! 表一对多的存储过程 请问????? DTS把数据从Excle侄入到SqlServer的问题 有关text字段的读取问题,急问!! 作业运行存储过程出错如何弹出提示 一個腦火的存儲過程出現的問題
insert into t2 select * from t1 where ...
再弱弱的问一下 必须要DELETE 一下吗?
set col1 = t1.col1,
col2 = t1.col2,
...
coln = t1.coln
from t2 , t1
where t2.id = t1.id
我不能 DELETE 因为我的ID1 是自动增长字段 如果更改后 会牵连起他几个程序...!
否则,一个个字段对应UPDATE.update t2
set col1 = t1.col1,
col2 = t1.col2,
...
coln = t1.coln
from t2 , t1
where t2.id = t1.id
set col1 = T1.col1, col2 = T1.col2 ...
from T1
where T1.colPK = T2.colPK