我刚刚开始学习oracle,在学习PL\SQL的时候遇到了小问题就是运行这段代码时,居然出现的结果是空行(代码是正确)::
declare
cursor mycur is
select * from department;
myrecord department%rowtype;
begin
open mycur;
fetch mycur into myrecord;
while mycur%found loop
dbms_output.put_line(myrecord.id||','||myrecord.depart);
fetch mycur into myrecord;
end loop;
close mycur;
end;
declare
cursor mycur is
select * from department;
myrecord department%rowtype;
begin
open mycur;
fetch mycur into myrecord;
while mycur%found loop
dbms_output.put_line(myrecord.id||','||myrecord.depart);
fetch mycur into myrecord;
end loop;
close mycur;
end;
SQL> set serveroutput on;--把输出打开
有什么学习oracle的好资料啊!或视频啊!指点指点!
alter session set nls_language='SIMPLIFIED CHINESE';
如果不行google,网上太多了
麻烦帮我,看看这个是为什么?创建触发器!
create or replace trigger del_depid
after delete on department
for each row
begin
delete from empl where id:=old.id;
end del_depid;
/
然后就出现这个警告了!每次都创建不成功!
Warning: Trigger created with compilation errors.