slq cursor
-
MS-SQL 커서 활용법 Cursor프로그램/Mssql 2024. 1. 23. 11:52
DECLARE @scode char(6) DECLARE @i INT SET @i=0 DECLARE Ncursor CURSOR FOR select s_code from tb_student where s_code=학생코드 OPEN Ncursor FETCH NEXT FROM Ncursor INTO @scode WHILE @@fetch_status = 0 BEGIN delete from tb_nowtable1 where s_code=@scode delete from tb_nowtable2 where s_code=@scode delete from tb_nowtable3 where mb_id=@scode delete from tb_nowtable4 where s_code=@scode FETCH NEXT FROM N..