MySQL Forums
Forum List  »  Newbie

select count(*) from table
Posted by: Shawn Rusin
Date: August 10, 2004 04:59PM

I have an issue where I'm running both versions of MYSQL 3.23 and 4.0

I’m using this script to monitor table size on my 4.0 server
Select count(*), 'Table1' from Table1 union all
select count(*), 'Table2' from Table2 union all
select count(*), 'Table3' from Table3
row : table_name
19 : table1
05 : table2
02 : table3
I need to run the same on my 3.23 but 'union all' is not supported in 3.23

Does some one know of a better way to do this?

I need a row count that is accurate from all tables in my database and would like it to contain the number of rows or size with the name of table

Shawn Rusin

Options: ReplyQuote

Written By
select count(*) from table
August 10, 2004 04:59PM

Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.