- 关 键 词:
- oracle存储过程
- server
连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> create or replace procedure get_news(
2 aid in varchar2,atitle in varchar2)
3 as
4 begin
5 select * from cf_news
6 end;
7 /
警告: 创建的过程带有编译错误。
SQL> create or replace procedure get_news(
2 aid in varchar2 ,atitle in varchar2)
3 as
4 beging
5 /
警告: 创建的过程带有编译错误。
SQL> create or replace procedure get_news(
2 aid in varchar2)
3 as
4 begin
5 select * from cf_news;
6 end;
7 /
警告: 创建的过程带有编译错误。
SQL> create or replace procedure get_news
2 as
3 begin
4 select * from cf_news;
5 end;
6 /
警告: 创建的过程带有编译错误。
SQL> show errors;
PROCEDURE GET_NEWS 出现错误:
LINE/COL ERROR
-------- -------------------------------------
4/1 PLS-00428: 在此 SELECT 语句中缺少 INTO 子句
SQL> create or replace procedure get_news
2 as
3 aa number;
4 begin
5 select count(*) into aa from cf_news;
6 end;
7 /
过程已创建。
SQL> create or replace procedure get_news
2 as
3 aa number;
4 begin
5 select count(*) into aa from cf_news;
6 dbms_outpub.put_line('aa='||aa);
7 end;
8 /
警告: 创建的过程带有编译错误。
SQL> show errors;
PROCEDURE GET_NEWS 出现错误:
LINE/COL ERROR
-------- -----------------------------------------
6/1 PLS-00201: 必须说明标识符 'DBMS_OUTPUB.PUT_LINE'
6/1 PL/SQL: Statement ignored
SQL> create or replace procedure get_news
2 as
3 aa number;
4 begin
5 select count(*) into aa from cf_news;
6 dbms_output.put_line('aa='||aa);
7 end;
8 /
过程已创建。
SQL> set serverout on;
SQL> execute get_news;
aa=3
PL/SQL 过程已成功完成。转 载:http://www.qqread.com/oracle/2006/08/g272189052.html
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- 存储过程 (2965篇文章)
- 网络存储—光纤通道 (3024篇文章)
- Oracle 10g基础应用 (4469篇文章)
- 服务器存储专栏 (8328篇文章)
- oracle 存储过程 (71篇文章)
- 数据库基本处理 (291篇文章)
- 教你正确的理解什么是数据库恢复 (14次浏览)
- Oracle数据库系统使用的几条经验分享 (5次浏览)
- JDBC连接Oracle数据库的十个技巧 (4次浏览)
- Oracle数据库三种标准的备份方法 (4次浏览)
- Oracle数据库的四种启动方式 (3次浏览)
- 在TransactionScope中优先使用Oracle的.NET驱 (2次浏览)
- Eclipse连接Oracle数据库的具体步骤 (2次浏览)
- 如何手工创建Oracle数据库 (1次浏览)
- 提高Oracle数据库系统Import的性能 (0次浏览)
- Oracle 9i在AIX上的性能调整 (0次浏览)



