读书人

删除多条数据的存储过程

发布时间: 2012-05-04 12:36:09 作者: rapoo

求一个删除多条数据的存储过程?
求一个删除多条数据的存储过程? 根据ID删除

[解决办法]

SQL code
create procedure a asdelete from tb where id=?execute a
[解决办法]
SQL code
Create proc Del_P (@ID int)SET XACT_ABORT on ;begin trandelete table1 where ID=@IDdelete table2 where ID=@IDcommit trango或用 begin trybegin tran...commit tranend trybegin catchselect ERROR_MESSAGE()rollback tranend catch 

读书人网 >SQL Server

热点推荐