红海工作室
红海工作室 专注网络营销解决方案

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语句



--------------------------
新闻:评论:Google打个喷嚏 整个Internet都感冒
网站导航: 博客园首页  新闻  .NET频道  社区  博问  闪存  找找看
posted on 2009-05-14 15:45  天新工作室  阅读(197)  评论(0编辑  收藏  举报