新人在此 SELECT 语句中缺少 INTO 子句,该怎么解决麻烦告诉我
展开全部
CREATE OR REPLACE PROCEDURE PROADMININFO
(ADMINNAME in varchar2,ADMINPWD in varchar2)ISBEGINselect * from userinfo where loginid=ADMINNAME and password=ADMINPWD;
END PROADMININFO;
PROCEDURE ZXDRB.PROADMININFO 编译错误
错误:PLS-00428: 在此 SELECT 语句中缺少 INTO 子句行:5文本:select * from userinfo where loginid=ADMINNAME and password=ADMINPWD;
------解决方案--------------------------------------------------------要么使用游标,要么有几个字段定义几个变量如:SQL code CREATE OR REPLACE PROCEDURE PROADMININFO(ADMINNAME in varchar2, ADMINPWD in varchar2) IS cur_restdata tbl_rest_waiting_queue%rowtype;--定义游标 begin select * into cur_restdata from userinfo where loginid=ADMINNAME and password=ADMINPWD; end; END PROADMININFO;
------解决方案--------------------------------------------------------select 后面缺少赋值into给变量
------解决方案--------------------------------------------------------探讨要么使用游标,要么有几个字段定义几个变量如:SQL code
CREATE OR REPLACE PROCEDURE PROADMININFO(ADMINNAME in varchar2,
ADMINPWD in varchar……
------解决方案--------------------------------------------------------END PROADMININFO 前面来个end;
------解决方案--------------------------------------------------------在pl/sql程序中不允许出现不带into子句的select语句。
参考代码如下:如果查询出来只有一条记录
SQL code CREATE OR REPLACE PROCEDURE PROADMININFO (adminName in varchar2, adminPWD in varchar2) IS rec userinfo%ROWTYPE; BEGIN SELECT * INTO rec FROM UserInfo WHERE loginid = adminName AND password = adminPWD; END PROADMININFO;
------解决方案--------------------------------------------------------procedure 不能仅仅只执行一个select语句。------解决方案--------------------------------------------------------查出来的数据应该有个容器来装它
(ADMINNAME in varchar2,ADMINPWD in varchar2)ISBEGINselect * from userinfo where loginid=ADMINNAME and password=ADMINPWD;
END PROADMININFO;
PROCEDURE ZXDRB.PROADMININFO 编译错误
错误:PLS-00428: 在此 SELECT 语句中缺少 INTO 子句行:5文本:select * from userinfo where loginid=ADMINNAME and password=ADMINPWD;
------解决方案--------------------------------------------------------要么使用游标,要么有几个字段定义几个变量如:SQL code CREATE OR REPLACE PROCEDURE PROADMININFO(ADMINNAME in varchar2, ADMINPWD in varchar2) IS cur_restdata tbl_rest_waiting_queue%rowtype;--定义游标 begin select * into cur_restdata from userinfo where loginid=ADMINNAME and password=ADMINPWD; end; END PROADMININFO;
------解决方案--------------------------------------------------------select 后面缺少赋值into给变量
------解决方案--------------------------------------------------------探讨要么使用游标,要么有几个字段定义几个变量如:SQL code
CREATE OR REPLACE PROCEDURE PROADMININFO(ADMINNAME in varchar2,
ADMINPWD in varchar……
------解决方案--------------------------------------------------------END PROADMININFO 前面来个end;
------解决方案--------------------------------------------------------在pl/sql程序中不允许出现不带into子句的select语句。
参考代码如下:如果查询出来只有一条记录
SQL code CREATE OR REPLACE PROCEDURE PROADMININFO (adminName in varchar2, adminPWD in varchar2) IS rec userinfo%ROWTYPE; BEGIN SELECT * INTO rec FROM UserInfo WHERE loginid = adminName AND password = adminPWD; END PROADMININFO;
------解决方案--------------------------------------------------------procedure 不能仅仅只执行一个select语句。------解决方案--------------------------------------------------------查出来的数据应该有个容器来装它
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询