CREATE PROCEDURE XTJ_NewsInfor_DeleteArray
@ID nvarchar(
as
DECLARE @PointerPrev int
DECLARE @PointerCurr int
DECLARE @TId int
Set @PointerPrev=
while (@PointerPrev < LEN(@ID))
Begin
Set @PointerCurr=CharIndex(
if(@PointerCurr>
Begin
set @TId=cast(SUBSTRING(@ID
Delete from XTJ_NewsInfor where ID=@TID
SET @PointerPrev = @PointerCurr+
End
else
Break
End
set @TId=cast(SUBSTRING(@ID
Delete from XTJ_NewsInfor where ID=@TID
GO
下來要批量刪除記錄的話只要給存儲過程傳參
From:http://tw.wingwit.com/Article/program/Oracle/201311/18463.html