条件判断Sql求助 如何在sql语句中用判断,比如当前时间小于某值,select a as hhh,大于某值,select b as hhh,写到一个select中,怎么写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select hhh=case when dt<getdate() then 'a'else 'b' end from t select (case when getdate()<'2007-1-1' then a when getdate()>'2007-7-7' then b end) as hhhfrom table select 'a' ,'hhh'= case when getdate() < dt then (select a as hhh) else (select b as hhh) end from table object_id与select * from dbo.sysobjects where id = object_id的区别 变量名 '@total' 已声明。变量名在查询批次或存储过程内部必须唯一。 帮忙看看这个sql语句为什么会错 text型的一定要用UPDATETEXT,WRITETEXT,READTEXT 吗?? 如何导出excel格式文件? SQL2008截取 高手请进----------这个工资缺勤报表怎么写SQL? SQL Server 出错 c#调用mssql视图生成xls文件的问题? 懂触发器进来 多表多条件多主键关联查询 数据库共享问题
else 'b' end from t
from table
from table