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 

fiddle demo

o/p:

countval -------- 5 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -