存储过程如下:
SQL> create procedure proc_luo as
  2  begin
  3   select * from soldierluo.a_luo;
  4  exception
  5  end;
  6  /警告: 创建的过程带有编译错误。

解决方案 »

  1.   

    pl/sql
    select * from soldierluo.a_luo; 
    语法不对,因该是select ...into... from ... 
      

  2.   

    select * from soldierluo.a_luo;
    不是有效的pl/sql语法,select col1 into v_col from table where ...
    如果你只要select * from soldierluo.a_luo;的效果的话,直接执行就好了,不用建过程
      

  3.   

    一个修正后的例子:create procedure proc_luo as 
      l_rowdata soldierluo%rowtype;
    begin 
      select * 
        into l_rowdata
        from soldierluo.a_luo
       where rownum=1; 
    exception when others then
      null;
    end; 

      

  4.   

    那如果有多行数据要返回该怎么写select语句呢?
      

  5.   

    如果只是想显示在屏幕上的话直接执行select语句,如果要用过程的话,可以用游标