创建存储过程的时候提示这个错误Errors for PROCEDURE SCOTT.MYPRO1:是不是我没有定义变量
SQL>createorreplaceproceduremyPro12as3begin4SELECTrt.*,edt.emp_fullname,ct.cate_nameA...
SQL> create or replace procedure myPro1
2 as
3 begin
4 SELECT rt.*,edt.emp_fullname,ct.cate_name AS jobName,ctt.cate_name AS majorName
5 FROM recommender_table rt LEFT OUTER JOIN emp_details_table edt ON (rt.emp_id=edt.emp_id)
6 JOIN categories_table ct ON (rt.job_id=ct.cate_id) AND ct.is_what_cate='B'
7 JOIN categories_table ctt ON(ctt.cate_id=rt.major_id) AND ctt.is_what_cate='C';
8 end;
9 /
Warning: Procedure created with compilation errors
SQL> show error;
Errors for PROCEDURE SCOTT.MYPRO1:
LINE/COL ERROR
-------- --------------------------------------------------------------
4/1 PLS-00428: an INTO clause is expected in this SELECT statement
SQL> 展开
2 as
3 begin
4 SELECT rt.*,edt.emp_fullname,ct.cate_name AS jobName,ctt.cate_name AS majorName
5 FROM recommender_table rt LEFT OUTER JOIN emp_details_table edt ON (rt.emp_id=edt.emp_id)
6 JOIN categories_table ct ON (rt.job_id=ct.cate_id) AND ct.is_what_cate='B'
7 JOIN categories_table ctt ON(ctt.cate_id=rt.major_id) AND ctt.is_what_cate='C';
8 end;
9 /
Warning: Procedure created with compilation errors
SQL> show error;
Errors for PROCEDURE SCOTT.MYPRO1:
LINE/COL ERROR
-------- --------------------------------------------------------------
4/1 PLS-00428: an INTO clause is expected in this SELECT statement
SQL> 展开
2个回答
展开全部
也可以说你没定义变量,select XX into XX from XX,这才是pl/sql程序的格式,你缺少into语句。
追问
关键是select rt.*,edt.emp_fullname,ct.cate_name AS jobName,ctt.cate_name AS majorName
这样一连串,该怎么写这个into 呢?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询