
sql
dragon_fire
这个作者很懒,什么都没留下…
展开
-
case when then的两种写法
第一种写法: select empno, ename, sal, case deptno when 10 then '财务部' when 20 then '研发部' when 30 then '销售部' else '未知部门' end 部门 from emp;第二种写法: select empno ,ename,sal, case when deptno = 10原创 2013-03-13 15:49:32 · 2279 阅读 · 0 评论 -
oracle 函数之nvl、nvl2函数
Oracle/PLSQL中的一个函数。 格式为: NVL( string1, replace_with) 功能:如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值,如果两个参数都为NULL ,则返回NULL。 注意事项:string1和replace_with必须为同一数据类型,除非显式的使用TO_CHAR函数进行类型转换原创 2013-03-13 15:59:11 · 804 阅读 · 0 评论