㈠ 鏁版嵁搴撴父鏍囨庝箞鍐
DECLARE娓告爣鍚CURSORFOR SELECT璇鍙OPEN娓告爣鍚FETCH娓告爣鍚INTO@鍙橀噺1,@鍙橀噺2,...,@鍙橀噺n--(鍙橀噺涓鏁拌佷笌SELECT璇鍙ョ粨鏋滅殑涓鏁颁竴鑷)WHILE(@@FETCH_STATUS=0) BEGIN --澶勭悊浠g爜 FETCH娓告爣鍚INTO@鍙橀噺1,@鍙橀噺2,...,@鍙橀噺n ENDCLOSE娓告爣鍚DEALLOCATE娓告爣鍚END