Select * From jobs;CREATE OR REPLACE Procedure conn_pro
(v_Id In Varchar2,v_title In Varchar2)
As
Declare
Type r_type Is Record(
v_myId jobs.job_id%Type,
v_title jobs.job_title%Type
);v_r1 r_type;
Cursor mycursor Is Select job_id,job_title From jobs;
Begin
Open mycursor;
Loop When mycursor%Found
Fetch mycursor Into v_r1;
dbms_output.put_line(v_r1.myId,v_r1.title);
Close mycursor;
End Loop;
End;报错说Compilation errors for PROCEDURE HR.CONN_PROError: PLS-00103: 出现符号 "("在需要下列之一时:
:= . ) , @ % default
character
符号 ":=" 被替换为 "(" 后继续。
Line: 2
Text: (v_Id In Varchar2,v_title In Varchar2)Error: PLS-00103: 出现符号 "("在需要下列之一时:
:= . ) , @ % default
character
符号 ":=" 被替换为 "(" 后继续。
Line: 2
Text: (v_Id In Varchar2,v_title In Varchar2)Error: PLS-00103: 出现符号 "DECLARE"在需要下列之一时:
begin function package
pragma procedure subtype type use <an identifier>
<a double-quoted delimited-identifier> form current cursor
external language
符号 "begin" 被替换为 "DECLARE" 后继续。
Line: 4
Text: DeclareError: PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
begin case declare
end exception exit for goto if loop mod null pragma raise
return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
Line: 17
Text: End;
(v_Id In Varchar2,v_title In Varchar2)
As
Declare
Type r_type Is Record(
v_myId jobs.job_id%Type,
v_title jobs.job_title%Type
);v_r1 r_type;
Cursor mycursor Is Select job_id,job_title From jobs;
Begin
Open mycursor;
Loop When mycursor%Found
Fetch mycursor Into v_r1;
dbms_output.put_line(v_r1.myId,v_r1.title);
Close mycursor;
End Loop;
End;报错说Compilation errors for PROCEDURE HR.CONN_PROError: PLS-00103: 出现符号 "("在需要下列之一时:
:= . ) , @ % default
character
符号 ":=" 被替换为 "(" 后继续。
Line: 2
Text: (v_Id In Varchar2,v_title In Varchar2)Error: PLS-00103: 出现符号 "("在需要下列之一时:
:= . ) , @ % default
character
符号 ":=" 被替换为 "(" 后继续。
Line: 2
Text: (v_Id In Varchar2,v_title In Varchar2)Error: PLS-00103: 出现符号 "DECLARE"在需要下列之一时:
begin function package
pragma procedure subtype type use <an identifier>
<a double-quoted delimited-identifier> form current cursor
external language
符号 "begin" 被替换为 "DECLARE" 后继续。
Line: 4
Text: DeclareError: PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
begin case declare
end exception exit for goto if loop mod null pragma raise
return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
Line: 17
Text: End;
解决方案 »
- 连接数据库报错
- ORACLE中的两条SQL语句问题
- 有关ORACLE的复杂要求,各位大虾帮忙看看!
- oracle自增长列为什么那么麻烦?
- 用过 sql navitagor的高手来帮个忙 严重给分
- 存储过程简单问题 来者有分!
- java.io.filenotfoundexception: /etc/oratab错误!!!!
- Oracle 9i的日志文件不小心被我删除,我该怎么办。救救我,oracle启不起了。
- 向各位大神请教 个ORA-12560: TNS: 协议适配器错误的问题
- 新手求指教!!!!!谢谢
- 高分求number型字段,怎么设置插入的值不能小于0,如果小于0,默认为0.
- 触发器语法上求有点困惑
触发器才用declare
应该为:dbms_output.put_line(v_r1.myId || v_r1.title);