Quality Testing

Quality is delighting customers

Query for column wise data count including the NULL record ?

Query for column wise data count including the NULL record

Views: 249

Reply to This

Replies to This Discussion

select columnA, count(*) from table group by columnA.

Hope this is what you were looking for

As per my knowledge there is no other way to do it other than adding one identity column and then performing count operations on that new column.

Query will be:
alter table tablename
add columnname int identity(1,1)

select Count(columnname) from tablename

sugat is right..

try this one select  count(Firstname) from [dbo].[User]

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service