world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Friday, February 14, 2014
EXEC Stored Procedure on a row without cursor
DECLARE @StudentID INT = -1
WHILE (1 = 1)BEGINSELECTTOP 1 @StudentID = StudentId
FROM Students
WHERE StudentId > @StudentID
ORDERBY StudentId
IF@@ROWCOUNT= 0
BREAK;EXEC dbo.ProcedureName@StudentId
END
No comments:
Post a Comment