Bug #9345 metadata queries: in subselects, field names, variables
Submitted: 22 Mar 2005 22:07 Modified: 4 Oct 2005 22:02
Reporter: Andris Kardos Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1.10 OS:Any (any)
Assigned to: CPU Architecture:Any

[22 Mar 2005 22:07] Andris Kardos
Description:
Would be nice if we could use metadata queries in subselects. Alsi, if the tables's names would come in a column not named after the name of the database ("tables_from_mydatabase"), since that makes joins impossible. Also, variables could be used in metadata queries. Also missing.

How to repeat:
SELECT * 
FROM (SHOW TABLES FROM mydatabase) m, plusinfo p
WHERE m.table_name = p.table_name

Suggested fix:
Think about it. Thanks.
[4 Oct 2005 22:02] Hartmut Holzgraefe
Starting with 5.0 you can use INFORMATION_SCHEMA queries instead