急急急!!!oracle

2024-12-22 13:35:26
推荐回答(2个)
回答1:

第2题的:
declare
cursor c_dept is select * from dept for update;
v_loc dept.loc%type;
v_dept c_dept%rowtype;
begin
for v_dept in c_dept loop
case v_dept.loc
when 'NEW YORK' then v_loc:='BEIJING';
when 'DALLAS' then v_loc:='SHANGHAI';
when 'CHICAGO' then v_loc:='GUANGZHOU';
when 'BOSTON' then v_loc:='XIAMEN';
end case;
update dept set loc=v_loc where current of c_dept;
end loop;
commit;
end;
/

回答2:

你好无聊。
还要写优缺点。