新手上路

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

set @ai_DupCount=0;
set @as_Sql = N'select @ai_DupCount=count(*) from ' + @as_TbName + ' where ' + @as_ColName + ' = ' + @as_ID;
execute sp_executesql @as_Sql,N'@ai_DupCount int output',@ai_DupCount output;

 

set @as_Sql='delete from ' + @as_TableNames + ' where ' + @as_PKName + ' = ' + @as_ID;
execute(@as_Sql);

posted on 2012-03-22 17:25  冬夜听雨  阅读(993)  评论(0编辑  收藏  举报