sql - To find total number of rows -
i have table this
table1 ======= b 8 5 2 9 null 4 2 5
how find total number of rows table1,note if column value null in row row should considered 2 rows?
i have tried count(*)*2 , nvl function doesn't work
try this
select sum(case when null or b null 2 else 1 end) countval table1
o/p:
countval -------- 5
Comments
Post a Comment