"是否"的小技巧~..~

--DECLARE @b BIT
--METHOD 1
SELECT SUBSTRING(
'否是',Col1+1,1)
from 
(
SELECT 
1 AS 'Col1'
Union all
select 
0)a

--METHOD2
SELECT 
    CASE Col1
    When 
0 Then  ''
    Else 
''
    End
from 
(
SELECT 
1 AS 'Col1'
Union all
select 
0)a

--METHOD3
SELECT 
    CASE 
    When Col1
=0  Then  ''
    Else 
''
    End
from 
(
SELECT 
1 AS 'Col1'
Union all
select 
0)a


还有的话大家说说~..~

posted @ 2008-03-15 19:19  roboth  阅读(355)  评论(0)    收藏  举报