728x90 반응형 서브쿼리1 oracle sql 서브쿼리,function,no_data_found,too_many_rows,others ed fn_deptInfocreate or replace function fn_deptInfo(v_name emp.ename%type)return varchar2isv_no number;v_dname varchar2(50);v_loc varchar2(50);v_total varchar2(100);beginselect d.deptno, d.dname, d.loc into v_no, v_dname, v_loc from (select deptno from emp where ename=v_name) e,dept d where d.deptno=e.deptno;v_total := '부서번호:'||v_no ||'부서명:'||v_dname||'장소:'||v_loc;return v_total;end;/----------.. 2015. 10. 7. 이전 1 다음 728x90 반응형