SQL2008-中不想插入从复记录
If not exists (SELECT ID FROM StuffAgitationYield where EMAgitation_ID=1 and YieldDateTime'2012-06-13 00:00:00' and TraySerial=3)
begin
end;
//if not exists,即如果不存在。就执行begin end;中间SQL。
If not exists (SELECT ID FROM StuffAgitationYield where EMAgitation_ID=1 and YieldDateTime'2012-06-13 00:00:00' and TraySerial=3)
begin
end;
//if not exists,即如果不存在。就执行begin end;中间SQL。
复盘是对过去的事情做思维演练!助你把事情琢磨透、做成功!
SQL循环插入记录,需要用到WHILE来实现,比如要插入L1至L50到表中。CodeCode highlighting produced
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M