摘要:
CREATE PROCEDURE DeleteNews @ID nvarchar(500)as DECLARE @PointerPrev int DECLARE @PointerCurr int DECLARE @TId int Set @PointerPrev=1 while (@PointerPrev < LEN(@ID)) Begin Set @PointerCurr=CharIndex(',',@ID,@PointerPrev) if(@PointerCurr>0) Begin set @TId=cast(SUBSTRING(@ID,@PointerPrev 阅读全文
摘要:
declare @num int, @sqls nvarchar(4000) set@sqls='select @a=count(*) from tableName ' exec sp_executesql @sqls,N'@a int output',@num output select@num详细参见:http://www.cnblogs.com/zhhe0800/archive/2011/07/21/2113346.html 阅读全文