CREAT PROCEDURE tester AS BEGIN SET NOCOUNT ON; DECLARE @userId varchar(50) DECLARE @count int SET @count = 0 SELECT @count = count(*) FROM UserService_User WHERE Account like '%111%' WHILE @count > 0 BEGIN SELECT @userId = Id FROM UserService_User WHERE Account like '%111%' exec UserService_RemoveUserByUserId @userId SET @count = @count -1 END END
巨人網(wǎng)絡通訊聲明:本文標題《如何在SQL SERVER 2005存儲過程中,使用循環(huán)語句》,本文關鍵詞 如,何在,SQL,SERVER,2005,存儲,;如發(fā)現(xiàn)本文內(nèi)容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
相關文章
下面列出與本文章《如何在SQL SERVER 2005存儲過程中,使用循環(huán)語句》相關的同類信息!