现在的位置: 首页 > 综合 > 正文

高级嵌套的查询sql语句

2012年08月31日 ⁄ 综合 ⁄ 共 254字 ⁄ 字号 评论关闭

select case when dayCount>10 or allCount>50 then '0' else '1' end as isTrue  from (select (select count(1) from product where Ptype='1' and datediff(day,getdate(),IssuseTime)=0  and C_ID=@C_ID) dayCount,(select count(1) from product where Ptype='1' and C_ID=@C_ID) allCount) t

高级嵌套的查询sql语句

抱歉!评论已关闭.