sql 是否执行sql函数判断?

insert into oac_file values('',GETDATE(),'')
sql 有没有一个函数来判断 是不是执行了?
update oea_file set oea21='' where oea51 in (select oea51 from oea_file where oea51='a124820007968')
and oea10='昆山仓库' and (oea02='在库' or oea02='待收货') and (insert into oac_file values('',GETDATE(),''))
如果 insert 成功 猜 update

呼如林
浏览 697回答 1
1回答

临摹微笑

@@rowcount 看一下,是否》0,如果是再继续insert into oac_file values('',GETDATE(),'')if @@rowcount>1 update oea_file set oea21='' where oea51 in (select oea51 from oea_file where oea51='a124820007968') and oea10='昆山仓库' and (oea02='在库' or oea02='待收货') and (insert into oac_file values('',GETDATE(),''))
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

SQL Server