Select ISNULL(Max(Empsalary),0) as salry from table1 where EmpID='1000'
IF EXISTS(Select 1 from table1 where EmpID='1000') Select ISNULL(Max(Empsalary),0) as salry from table1 where EmpID='1000' ELSE Select 0 as salry
Cheers www.SQLServerbuddy.blogspot.com iLink Multitech Solutions
select isNull( Max(Empsalary),0) as salry from table1 where EmpID='1000'
Thank you for posting at Dotnetfunda [Administrator]
Login to post response