日期:2014-05-18 浏览次数:20493 次
select case when name='小明' then 'True' else 'False' end from Student
------解决方案--------------------
SELECT CASE WHEN name = '小明' THEN 'True' ELSE 'False' END FROM tb
------解决方案--------------------
select case when name='小明' then 'True' else 'False' end from Student
------解决方案--------------------
或者 select 'True' from tb where name='小明' union all select 'False' from tb where name<>'小明'