Hi,
When issuing a UNION query with a column having an alias starting
with a '*' (star/asterisk) character, the database returns an
error:
ERROR 1051: Unknown table ''
select version() as `*` UNION select user() as `anything`;
Notice that the '*' is properly quoted with inverse quotes.
The simple statement
SELECT version() AS `*`;
works fine. The error only shows up with UNION.
Thanks for a fine bug report. This has been filed as bug #1249. You can
follow its progress at: http://bugs.mysql.com/bug.php?id=1249
Rgds,
Indrek