Chinaunix首页 | 论坛 | 博客

-

  • 博客访问: 164609
  • 博文数量: 48
  • 博客积分: 2000
  • 博客等级: 大尉
  • 技术积分: 490
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-22 18:51
文章分类

全部博文(48)

文章存档

2010年(23)

2009年(25)

我的朋友

分类: Oracle

2010-08-31 18:21:55

NVL的概念Oracle/PLSQL中的一个函数。   格式为:   NVL(string1,replace_with)   功能:如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值。   注意事项:string1和replace_with必须为同一数据类型,除非显示的使用TO_CHAR函数。   例:NVL(TO_CHAR(numeric_column), 'some string') 其中numeric_column代指某个数字类型的值。   例:NVL(yanlei777, 0) 的意思是 如果 yanlei777 是NULL, 则取 0值 通过查询获得某个字段的合计值,如果这个值为null将给出一个预设的默认值  例如:select nvl(sum(t.dwxhl),1) from tb_jhde t   就表示如果sum(t.dwxhl
阅读(1648) | 评论(0) | 转发(0) |
0

上一篇:Cannot find bean under name org.apache.struts.tagl

下一篇:没有了

给主人留下些什么吧!~~