写一下语句,加深记忆

来源:6-12 case...when语句

180416

2018-11-30 16:51

select case column_name1 

    when value1 then result1 

    [when value2 then result2.....][else result] 

    end [as column_new_name]

    [,case 

     when expr1 then result1 

    [when expr2 then result2...]

    [else result] 

    end [as column_new_name]

    [,case...]

    ]

from tb_name;


写回答 关注

1回答

  • 莫失聪聪3779259
    2018-12-05 17:30:35

    select case column_name1

    when value1 then result1

    [when value2 then result2.... ][else result]

    end [as column_new_name]

    [,case 

    when expr1 then result1

    [when expr2 then result2...]

    [else result]

    end [as column_new_name]

    [,case...]

    ]

    from tb_name;

Oracle数据库开发必备利器之SQL基础

为你带来Oracle开发必备的sql基础,为后续课程学习打下好的基础

160642 学习 · 641 问题

查看课程

相似问题