set serveroutput on;
begin
for rec in (select * from emp) loop
insert into emp (stars) values (rpad(' ', salary/1000, '*'));
end loop;
end;
/
返回以下错误:
Error report:
ORA-06550: line 3, column 45:
PL/SQL: ORA-00984: column not allowed here
ORA-06550: line 3, column 3:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
我想在表的stars
列中emp
(与 相同employees
)添加一串星号,每 1000 的薪水对应一个星号。
有人可以解释一下错误是什么。谢谢