ACCESS 例子: insert into products (ProNumber,CASNumber,Cnname,Price,Enname,Baozhuang,Pinpai) select ProNumber,CASNumber,Cnname,Price,Enname,Baozhuang,Pinpai from product22 1.用一句sql从一个表里面取出数据导入另外一个表里面.这个对不同程序之间的数据转换很有用处,而且速度快,数据完整: insert into table1 (c…
1. 1百万的测试数据的生成 declare @index int; begin set @index=0; while @index<1000000 begin insert into teptable values(@index,STR(@index)+'name',str(@index)+'appname'); set @index=@index+1; end end 2. merge into sql 更新语句 -- 同库数据更新merge into teptable…
图所示现需要批量更新table2表内字段Pwd更新userName对IP地址username与Ip对应关系table1所示 update table2 set pwd=table1.ip from table1 inner join table2 on table1.username=table2.username UPDATE TABLE2 A SET A.PWD =(SELECT B.IP FROM TABLE1 B WHERE B.userName =A.userName)…