当前位置: 首页 > news >正文

怎么申请自己的网站网络营销做的比较好的企业

怎么申请自己的网站,网络营销做的比较好的企业,网站模板 首饰预定,日本视觉设计网站oracle存储过程中遇到的各种问题及解决方案集锦 1、在oracle数据库中,为了存储过程和数据表的关键字不冲突,数据表的别名不能加AS: select a.appname from appinfo a; --正确 select a.appname from appinfo as a; --错误2、在存储过程中&am…

oracle存储过程中遇到的各种问题及解决方案集锦


1、在oracle数据库中,为了存储过程和数据表的关键字不冲突,数据表的别名不能加AS:

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

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,编译报错:Error: PLS-00428: an INTO clause is expected in this SELECT statement

3、在select…into时,必须确保数据库中有该条记录,否则会报no data found 异常。

可以在使用该语句之前,用select count(*) from …查看数据库中是否存在数据记录,若存在,再行使用select…into…from语句进行查询。

4、在存储过程中,别名不能和字段名称相同,否则虽然编译可以通过,但在运行阶段会报错

select keynode into kn from APPFOUNDATION where appid=aid and foundationid=fid;-- 正确运行
select af.keynode into kn from APPFOUNDATION af where af.appid=appid and af.foundationid=foundationid;-- 运行阶段报错,提示ORA-01422:exact fetch returns more than requested number of rows

5、在存储过程中,出现null的问题,最好先判断一下

假设有一张表,定义如下:
create table A(id varchar2(50) primary key not null,vcount number(8) not null,bid varchar2(50) not null -- 外键 );
如果在存储过程中使用如下语句
select sum(vcount) into fcount from A where bid='xxxxxx';
如果A表中不存在bid="xxxxxx"的记录,则fcount=null(即使fcount定义时设置了默认值,如:fcount number(8):=0依然无效,fcount还是会变成null),这样以后使用fcount时就可能有问题,所以在这里最好先判断一下:
if fcount is null then    fcount:=0;end if;
这样就ok了。

6、使用hibernate调用存储过程

this.pnumberManager.getHibernateTemplate().execute(new HibernateCallback() {                    public Object doInHibernate(Session session)  throws HibernateException, SQLException {                        CallableStatement cs = session.connection().prepareCall("{call modifyapppnumber_remain(?)}");                        cs.setString(1, foundationid);                        
cs.execute();                        
return null;                    
}                
});

以上是oracle存储过程使用过程中常见的一些问题及解决方案,希望对你有所帮助,在编程的路上少走一些弯路。

http://www.shuangfujiaoyu.com/news/17477.html

相关文章:

  • html旅游网站页面设计模板关键词搜索排名查询
  • 优化站诊断网络营销推广专家
  • 电子商务网站建设外包服务的企业广州seo教程
  • iss怎么做网站互联网运营
  • 网站开发技术背景介绍个人对网络营销的看法
  • 在上面网站上可以做统计图兰州seo技术优化排名公司
  • 如何给网站做以下哪个单词表示搜索引擎优化
  • 如何做网站建设业务员seo优化搜索结果
  • 公司注册网站及流程自己开发网站怎么盈利
  • 免费做网站报价南京网站设计公司
  • 东莞常平美食seo算法入门教程
  • 遂宁做网站搜索引擎优化需要多少钱
  • 网站建设制作经验足seo百度百科
  • 建设网站50m数据库软文范例500字
  • 广东阳江发布最新消息专业seo优化公司
  • 郑州做网站网络公司最好的免费信息发布平台
  • 重庆新闻联播北京搜索引擎优化seo专员
  • 做纺织机械的网站域名优化大师app下载
  • 深圳有什么网站seo咨询师
  • 深圳网站建设公司排行榜二十四个关键词
  • 宿迁网络公司哪家专业上海百度seo牛巨微
  • wordpress 文章顶踩插件昆明关键词优化
  • 给网站做图网站排名查询站长之家
  • 网站做淘宝客登录百度账号
  • 公司做网站比较好的网销平台排名
  • 网站开发前期功能策划搜狗推广管家
  • 百度没有收录我的网站吗室内设计培训班学费一般多少
  • 做html网站百度浏览器app
  • 网站备案官网就业seo好还是sem
  • 帮人做项目的网站软文范例大全100字