嵌套案例:我怎么能正确写?

时间:2016-11-01 19:14:53

标签: oracle plsql

res

逻辑是以防万一!我怎么写得好? 我一般可以这样写吗?

1 个答案:

答案 0 :(得分:0)

CASE    WHEN book_id is not null
    THEN CASE 
                    WHEN title=title_id
                    THEN title_id
                    ELSE 0 
         END,
    ELSE CASE 
                    WHEN "Handle the other cases for book"
                    THEN "Case 2"
                    ELSE "Default for other Case" 
         END
END