批量删除一些数据的一个存储过程

一种方式:
create proc deletesomerecs (@ids varchar(8000))
as
exec('delete from inmodify where inmid in ('+@ids+')')
另一种方式:
create proc deletesomerecs (@ids varchar(8000))
as
delete from inmodify where charindex(','+ltrim(inmid)+',', ','+@ids+',')>0
posted @ 2011-03-08 14:03  与时俱进  阅读(308)  评论(0编辑  收藏  举报
友情链接:同里老宅院民居客栈