select (case when num>0 then 'Y' when num=0 then 'NG' else 'N' end) as column from table 转载于:https://www.cnblogs.com/TonnyGu/archive/2011/03/22/1991311.html