Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count records in multiple tables

Status
Not open for further replies.

thorny00

Programmer
Feb 20, 2003
122
US
I have the following that gives me all the tables that with FOO in the table name. Now I want to list each table that has FOO in the table name and the count of records in each of those tables.
I.E.
TableName Count
FOO1 1000
FOO2 50,000
FOO3 100,000
F004 90
I know I can do a select count(*) from FOO1 and so forth, but I would like to list all tables and counts together.

Thanks in advance for you time and help, I greatly appreciate it.
 
Use a Union all statement

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top