Oracle?洢?????????????
???????????? ???????[ 2017/2/20 10:56:06 ] ????????????? Oracle
????ORACLE ??????????С????
????1.????pl/sql???????
????2.??????
????declare
????empname varchar2(255);
????customize_exp EXCEPTION; --???????
????begin
????FOR c IN (select d.* from scott.dept d) LOOP
????begin
????dbms_output.put_line('dept: ' || c.deptno || '=' || c.dname);
????--??????ID?40??????
????if (c.deptno = 40) then
????RAISE customize_exp; -- ??????????
????end if;
????--??????ID?10??20??30???????????????????????????????? Too many rows round!
????--??????ID?40???????????У????????
????select e.ename into empname from scott.emp e
????where e.deptno = c.deptno;
????exception
????when customize_exp then
????dbms_output.put_line('customize error!');
????when no_data_found then
????dbms_output.put_line('Data is not found!');
????when too_many_rows then
????dbms_output.put_line('Too many rows round!');
????when OTHERS then
????dbms_output.put_line('others error');
????end;
????END LOOP;
????end;
????3.???
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11