selct XX , YY into iID,varName from mytable where rownum = 1;

解决方案 »

  1.   

    不可以,SQL>  declare
      2   i number(16);
      3   j number(16);
      4   begin
      5     select num_on_st,this_st_area  into i, j
      6        from bao_temp
      7  where rownum=1;
      8  end;
      9  /PL/SQL 程序順利完成SQL> declare
      2  i number(16);
      3  j number(16);
      4  begin
      5    select num_on_st into i,this_st_area into j
      6    from bao_temp;
      7  end;
      8  /
      select num_on_st into i,this_st_area into j
                                           *
     ERROR 在行 5:
    ORA-06550: 第 5 行, 第 40 個欄位:
    PLS-00103: 發現了符號 "INTO" 當您等待下列事項之一發生時:
    . ( , % from
    符號 ". 在 "INTO" 繼續之前插入.
      

  2.   

    不可以,要定义两个变量来接收两个值select id,name into v_id,v_name from table ......