比如我有个存储过程!是这样的
CREATE PROCEDURE dbo.StoredProcedure1
AS
SET NOCOUNT ON
delete from aaa wher acc='1'
delete from aaa wher acc1='1'
delete from aaa wher acc2='1'
delete from aaa wher acc3='1'
delete from aaa wher acc4='1'
这样的存储过程如果中间比如说aac2这里表里没有那个1数据那么他就会停止执行我想让他即使没有数据也照样执行下去直到完成整个过程!我该怎么写啊!大家帮帮忙谢谢了
CREATE PROCEDURE dbo.StoredProcedure1
AS
SET NOCOUNT ON
delete from aaa wher acc='1'
delete from aaa wher acc1='1'
delete from aaa wher acc2='1'
delete from aaa wher acc3='1'
delete from aaa wher acc4='1'
这样的存储过程如果中间比如说aac2这里表里没有那个1数据那么他就会停止执行我想让他即使没有数据也照样执行下去直到完成整个过程!我该怎么写啊!大家帮帮忙谢谢了
AS
SET NOCOUNT ON
delete from aaa where acc='1'
delete from aaa where acc1='1'
delete from aaa where acc2='1'
delete from aaa where acc3='1'
delete from aaa where acc4='1'
2005中可以try catch
实在要这样,我以为可以查系统表 看有没有,没有就跳过。其他的就不知道了