查询10和20号部门的员工 SQL> 1. select * from emp where deptno in (10,20); SQL> 2. select * from emp where deptno=10 or deptno=20; SQL> 3. 集合运算 SQL> select * from emp where deptno=10 SQL> 加上 SQL> select * from emp where deptno=20 SQL> */ SQL>…
游标遍历select语句 set serveroutput on; declare type sp_test1_cursor is ref cursor; test1_cursor sp_test1_cursor; v_name user_tables.TABLE_NAME%type; v_count number; strsql ); begin open test1_cursor for select table_name from user_tables; loop fetch test1…