日期:2014-05-16  浏览次数:20487 次

对查询结果没有的情况下用零代替结果
select isNull(PremiumOld,0) as PremiumOld from view_Prodect where Material='304HC' and  [Name]='GB818' and Specification='M1.6*18'
union all
select 0 as PremiumOld from (select 0 as A) as TB where not exists(select 1 from view_Prodect 
where Material='304HC' and  [Name]='GB818' and Specification='M1.6*18')