查询语句一问 有两张表tablea,tableb,我想把tablea中的数据插到tableb中去。但前提是tableb中不存在这条数据,该数据关键字有a,b两个字段,求语句(不想用游标) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 insert into tableb(a,b)select a.a,a.b tablea a where not exists (select 1 from tableb b where b.a=a.a and b.b=a.b )这样? 忘记了个frominsert into tableb(a,b)select a.a,a.b from tablea a where not exists (select 1 from tableb b where b.a=a.a and b.b=a.b ) tablea和tableb的 表结构是怎么样的,需要插什么字段需要说清楚。 表结构一样的话insert into tableb select * from tablea a where not exists (select 1 from tableb b where b.a=a.a and b.b=a.b) 新手请告诉我好吗? 请问一个存储过程的float类型问题 查询某段日期时间内的字段怎么写啊?? 如何处理多个同时插入的数据? 还是图片存储问题? ws2008(64bit)sp1下无法安装sqlserver2005(64bit) 我的触发器功能为何没有实现?在线等! 请教一句sql SQL高手问题请教 有个文本能不能把的数据导入TABLE里啊?怎么导?(详情见内) MSSQL 2008建数据库链接出错,请帮忙。 Lumigent Log Explorer出现No log recorders found that match the filter
select a.a,a.b tablea a where not exists (select 1 from tableb b where b.a=a.a and b.b=a.b )这样?
insert into tableb(a,b)
select a.a,a.b from tablea a where not exists (select 1 from tableb b where b.a=a.a and b.b=a.b )