here i am having table
declare @test1 table(
id int,
val varchar(20),
ser int,
sa int
)
insert into @test1
select 1,'rer',1,Null union all
select 2,'rer1',Null,Null union all
select 3,'',Null,Null
select * from @test1
--select ID,val,ISNULL(ser,0) AS ser,ISNULL(sa,0) AS sa from @test1
select ID,ISNULL(val,0) AS val,ISNULL(ser,0) AS ser,ISNULL(sa,0) AS sa from @test1
to avoid null i just used
select ID,ISNULL(val,0) AS val,ISNULL(ser,0) AS ser,ISNULL(sa,0) AS sa from @test1
but when coulmn is empty means the value was not changing to zero
the out put of the select query
IDvalsersa
1rer10
2rer100
300
this there any way to show th empty column value as 0