_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › PL/SQL螳
|
|
[edit]
3 覲 #覲
declare i number := 10; b boolean; str varchar(20); type varArrary is table of number index by pls_integer; comm_tab varArrary; 覲 螳 (讌)
declare i number := 10; b boolean; str varchar(20); type varArrary is table of number index by pls_integer; comm_tab varArrary; begin i := i + 1; b := (i < 3); str := '伎'; comm_tab(10) := 20*20; end; 覲 螳 (into 伎)
declare bonus number(8,2); emp_id number(6) := 100; begin select salary * 0.10 into bonus from employees where employee_id = emp_id; dbms_output.put_line('bonus = ' || bonus); end; 覲 螳 豢
declare i number := 10; b boolean; str varchar(20); type varArrary is table of number index by pls_integer; comm_tab varArrary; begin i := i + 1; b := (i < 3); str := '伎'; comm_tab(10) := 20*20; dbms_output.put_line(i); if b = true then dbms_output.put_line('true'); else dbms_output.put_line('false'); end if; dbms_output.put_line(str); dbms_output.put_line(comm_tab(10)); end; declare credit_limit CONSTANT NUMBER := 5000.00; [edit]
4 bulk collect #declare type type_job_id is table of hr.jobs.job_id%type index by pls_integer; type type_job_title is table of hr.jobs.job_title%type index by pls_integer; v_job_id type_job_id; v_job_title type_job_title; col1 char(13); begin select job_id, job_title bulk collect into v_job_id, v_job_title from hr.jobs; for i in v_job_id.first .. v_job_id.last loop col1 := v_job_id(i); dbms_output.put_line('job_id = ' || col1 || ' job_title = ' || v_job_title(i)); end loop; end;
鏤
|
螻 蟆 讌 蟆覲企 . (A.) |