for loop1 [PL/SQL] Cursor/Loop/For Loop문 - 부서 번호 물어보기 💡부서 번호 물어보고, 해당 부서 사원 이름, 월급, 부서 번호 출력하기 1. Cursor / Loop문 Cursor문 사용 : cursor는 PS/SQL에서 처리할 데이터를 저장할 메모리 영역이다. Loop문 사용 : exit안하면 무한반복 주의!! declare v_ename emp.ename%type; v_sal emp.sal%type; v_deptno emp.deptno%type; cursor emp_cursor is -- 메모리 이름을 emp_cursor로 지정 select ename, sal, deptno from emp where deptno = &p_deptno; -- p_deptno로 입력받은 부서번호 사원들 이름,월급,부서번호를 메모리에 올림 begin open emp_cursor; -.. 2022. 11. 29. 이전 1 다음