首页 相关文章 关于Oracle存储过程的若干问题备忘

关于Oracle存储过程的若干问题备忘

  1.在Oracle中,数据表别名不能加as,如:

  select a.appname from appinfo a;-- 正确

  select a.appname from appinfo as a;-- 错误

  也许,是怕和oracle中的存储过程中的关键字as冲突的问题吧

  2.在存储过程中,select某一字段时,后面必须紧跟into,如果select整个记录,利用游标的话就另当别论了。

  select af.keynode into kn from APPFOUNDATION af where af.appid=aid and af.foundationid=fid;-- 有into,正确编译

  select af.keynode from APPFOUNDATION af where af.appid=aid and af.foundationid=fid;-- 没有into,编译报错,提示:Compilation

  Error: PLS-00428: an INTO clause is expected in this SELECT statement

...[ 查看全文 ]

2016-02-19 标签:

关于Oracle存储过程的若干问题备忘的相关文章

手机页面
收藏网站 回到头部