SQL CASE WHEN 语句

SQL CASE WHEN 语句:

SELECT
    s.school_id,
    s. NAME,
    s.school_type,
    (
        CASE s.school_type
        WHEN 3 THEN
            'aa'
        WHEN 2 THEN
            'bb'
        END
    ) 自定义
FROM
    franchised_school_info s

 

posted @ 2019-08-21 15:12  江南孤狼  阅读(4808)  评论(0编辑  收藏  举报