Script that provides the row counts and table names

后端 未结 7 1859
旧巷少年郎
旧巷少年郎 2021-02-05 10:24

Maybe you easily said how to I provide table names and row counts?

Pseudo SQL:

for \"select tablename from system.Tables\" into :tablename
  execute \"se         


        
7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 10:40

    exec sp_MSForEachTable 'SELECT ''?'' as TableName, COUNT(*) as Rows FROM ?'
    

提交回复
热议问题