How to fetch the row count for all tables in a SQL SERVER database [duplicate]
问题 This question already has an answer here: Query to list number of records in each table in a database 19 answers I am searching for a SQL Script that can be used to determine if there is any data (i.e. row count) in any of the tables of a given database. The idea is to re-incarnate the database in case there are any rows existing (in any of the database). The database being spoken of is Microsoft SQL SERVER . Could someone suggest a sample script? 回答1: The following SQL will get you the row