Oracle存储过程PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following: :=.)

很简单的存储过程一直提示错误:

PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following:
:=.),@%default character
The symbol ":=" was substituted for "NUMBER" to continue.

按照错误提示,尝试如下两种改动都不管用。

在声明时 a inout NUMBER 改为 :a inout NUMBER,

使用输出变量时,a := b 改为 :a := b,

最后发现Oracle中没有inout,只有in out,代码改为:

CREATE OR REPLACE 
procedure TESTS(a in out  int,b in out  int)
as
temp NUMBER(12);
begin
temp := a;
a := b;
b := temp;
end ;

oracle的存储过程和mysql的写法不一样的,下面这么写是mysql的写法

create procedure tests(inout a int,inout b int)
begin
declare temp int;
set temp = a;
set a = b;
set b= temp;
end ;

补充一下,mysql没有number类型

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值