--how to handle null values in sql server
create table salarytable(salary int,bonus int)
--table
insert into salarytable values(36000,null),(40000,null),(38000,4000),(35000,3000)
select * from salarytable
--waq to findout the totalsalary
select salary+isnull(bonus,0) as Totalsalary from salarytable
No comments:
Post a Comment