Query to get the all table names with their total number of columns stored in ms sql server


In this programming tutorial you will learn the query to get the all table names with their total number of columns stored in ms sql server. Its quite easy. Lets have a look over the query given below.

select table_name,count(*) as total_columns from information_schema.COLUMNS
GROUP BY table_name order by table_name asc

So that's it.
I love your feedback.

0 comments: