UNION is currently not supported, though one workaround is merge tables,
it's not quite the same thing.

As to your query SELECT COUNT(*) FROM table1,table2, it is returning the
expected result.  Without a WHERE clause, you are getting the cartesian
product of both tables (all rows from table1 joined to all rows of table2).


"Ansgar Becker" <[EMAIL PROTECTED]> wrote:

> > is it possible to get *one* quick result with the rowcount of each
table
> in
> > one database, without knowing the column-names?
> >
> > this does *not* work:
> >  select count(t1.*), count(t2.*)
> >    from table1 t1, table2 t2


> Select 'Table1' as tableName, count(*) as rowCount from table1
> UNION
> Select 'Table2' as tableName, count(*) as rowCount from table2
> ...
> etc
>
> Assuming that MySQL can use the UNION clause. (I haven't checked)


I think MySQL actually doesn't support union. ;/ I wonder if this is so
difficult.. Only getting rowcounts of different tables in one result.

I tried also the folliowing:
  select count(*) from table1, table2.
But this (curiously) returns "table1rowcount * table2rowcount"


Greetings,
Ansgar









---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to