Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
burtondav
Starting Member
1 Post |
Posted - 2011-04-25 : 15:45:28
|
| I would like to just count the number of records in several tables.For instance:Select Count(*) from Asset.Is there a way to write ONE select and count records from multiple tables?Burtondav |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-04-25 : 15:53:10
|
| If you have no WHERE conditions:SELECT OBJECT_NAME(OBJECT_ID) tbl, rowsFROM sys.partitionsWHERE index_id<2AND OBJECT_NAME(OBJECT_ID) IN ('myTable1', 'myTable2', 'myTable3') |
 |
|
|
|
|
|