实际上我对 PL/SQL 很陌生
我在 SQL Fiddle 中使用 oracle pl/sql 创建了下表
create table Employee(name varchar2(100),id integer, salary integer,PRIMARY KEY(id));
insert into Employee(name,id,salary) values('sa',94,100);
insert into Employee(name,id,salary) values('pr',88,150);
insert into Employee(name,id,salary) values('ji',33,900);
insert into Employee(name,id,salary) values('na',24,880);
insert into Employee(name,id,salary) values('po',65,770);
insert into Employee(name,id,salary) values('ri',69,910);
insert into Employee(name,id,salary) values('uj',12,650);
insert into Employee(name,id,salary) values('ad',43,440);
insert into Employee(name,id,salary) values('sam',40,550);
我执行了以下查询
DECLARE
employee_record Employee%ROWTYPE;
BEGIN
select * into employee_record from Employee where id>90;
dbms_output.put_line(employee_record.name||' '||employee_record.id||' '||employee_record.salary);
END;
/
我得到以下输出
Record Count: 0; Execution Time: 2ms
它应该打印员工记录中存在的值,对吗?我的 sql 查询有问题还是 sql fiddle 无法显示 dbms_output 有问题?