qiudechao1
leo_qiu_s
2019-08-01 18:13
采纳率: 66.7%
浏览 649

Navicat连接Oracle如何声明变量、创建变量?

variable stu_name varchar2(20);
DECLARE stu_name varchar2(20);

在查询界面输入上面两种代码都不行!

variable stu_name varchar2(20);

提示错误:

[SQL]variable stu_name varchar2(20)
[Err] ORA-00900: invalid SQL statement
DECLARE stu_name varchar2(20);

提示错误:

[SQL]DECLARE stu_name varchar2(20);
[Err] ORA-06550: line 1, column 30:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

begin function pragma procedure subtype type
current cursor delete
exists prior

Navicat连接Oracle该怎么样声明变量?
声明变量后,我要调用存储过程:call SELECT_STUDENT2('1',:stu_name);

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

相关推荐