【发布时间】:2013-10-04 16:22:42
【问题描述】:
使用以下 PL/SQL 时出现错误:
1 DECLARE
2 var_salary number(6);
3 var_emp_id number(6) =7788;
4 BEGIN
5 SELECT sal
6 INTO var_salary
7 FROM emp
8 WHERE emp.empno =var_emp_id;
9 dbms_output.put_line(var_salary);
10* end;
SQL> /
var_emp_id number(6) =7788;
*
ERROR at line 3:
ORA-06550: line 3, column 23:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
:= ; not null default character
The symbol ":= was inserted before "=" to continue.
我是初学者,不知道为什么会出错
【问题讨论】:
-
你得到一个明确的错误,告诉你把冒号 : 符号放在等于 = 符号的前面,用于分配一个该字段的值。
标签: oracle plsql syntax-error