database - How to find list of tables having no records in SQL server -


how display list of tables having no record inserted in them , existing in sql server database.required show tables no record in them.

try this:

select      t.name tablename,     p.rows rowcounts      sys.tables t inner join      sys.partitions p on t.object_id = p.object_id       t.name not 'dt%'      , t.is_ms_shipped = 0     , p.rows = 0 group      t.name, p.rows order      t.name 

the query goes sys.tables , other catalog views find tables, indexes , partitions, find tables have row count of 0.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -