方法一、

select col1 from table1

union select 0

order by col1 desc

方法一可以用在金蝶K3自定义报表的KPGETSQL语句中

方法二、

if exists (select col1 from table1)

select col1 from table1

else select 0

posted on 2010-07-15 09:47  TsingCai  阅读(1135)  评论(0编辑  收藏  举报