oracle商店程序 [英] oracle store procedure
问题描述
以下是我的商店程序
创建或更换程序spIsUserExist IS
用户名VARCHAR2(50);
BEGIN
从useraccounts中选择count(*)INTO用户名,其中username = username ;
END spIsUserExist;
我的程序是成功创建但是当我执行这个,然后我得到以下
错误
ORA-06550:第1行,第21栏:
PLS-00103:遇到以下任何一种情况时遇到符号USER.IT:
:=。 (@%;
符号:=代替USER.IT继续。
below is my store procedure
CREATE OR REPLACE PROCEDURE spIsUserExist IS
username VARCHAR2(50);
BEGIN
select count(*) INTO username from useraccounts where username=username;
END spIsUserExist;
my procedure is created sucessfully but when i am executing this then i am getting below
error
ORA-06550: line 1, column 21:
PLS-00103: Encountered the symbol "USER.IT" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "USER.IT" to continue.
推荐答案
我不知道理解这个存储过程背后的逻辑。
但是无论如何试试这个
I don't understand the logic behind this stored procedure.
But anyway try this
CREATE OR REPLACE PROCEDURE spIsUserExist IS
t_username VARCHAR2(50);
BEGIN
select count(*) INTO t_username from useraccounts where username=username;
END spIsUserExist;
CREATE OR REPLACE PROCEDURE spIsUserExist IS
username VARCHAR2(50) out;
BEGIN
select count(*) INTO username from om where name=username;
END spIsUserExist;
可能会帮助你
may be this one will help you
这篇关于oracle商店程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!