资讯   |   开发   |   选机中心   |   产品大全 | IBM | 惠普 | 联想 | 戴尔 | 苹果 | 神舟
更多: | 华硕 | 明基 | 方正 | 紫光 | TCL | 夏新 | 联宝 | 宏碁 | 七喜 | 长城 | 清华同方 | 海尔 | 三星 | 东芝 | 索尼 | 富士通 | LG | 技术 | ddnoon
当前位置:笔记本 > 软件开发 >
Advertisement
文章正文

这个存储过程错在哪里?

类型:转载   责任编辑:asp.net   日期:2007/05/23


热门软件下载:


   

create   or   replace   procedure   testselect   is  
  begin  
      select   *   from   g_language  
  end   ;  
   
  ===========================================  
   
   
  Compilation   errors   for   PROCEDURE   IN_USER.TESTSELECT  
   
  Error:   PLS-00103:   Encountered   the   symbol   "end-of-file"   when   expecting   one   of   the   following:  
                 
                      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  
                      <a   single-quoted   SQL   string>   pipe  
  Line:   5

网友回答:

发表者:dinya2003

oracle中的pl/sql中使用select   要用into变量的形式:  
   
  create   or   replace   procedure   testselect(p_out   out   number)   is  
          v_count   number;  
  begin  
      select   count(*)   into   v_count   from   g_language;       <--要加分号  
      p_out:=v_count;       <--返回值   ,当然你还可以进行其他操作  
  end   ;  
   
  --看pl/sql基础类的书,入门会快些.  
 

发表者:skystar99047

create   or   replace   procedure   testselect(p_out   out   number)   is  
          v_count   number;  
  begin  
      select   count(*)   into   v_count   from   g_language;  
      p_out:=v_count;  
  end   ;  
  /

发表者:liuyi8903

create   or   replace   procedure   aa   is  
  a   varchar2(10);  
  begin  
      select   id   into   a   from   tablename    
  end   ;  
 


 

 
热门推荐笔记本: 顶星笔记本
相关文章:
webmaster:popbb@126.com   最佳浏览:1024X768 MSIE
©2007 popbb.net All Rights Reserved