My query is "select column_name,table_name from information_schema.columns"
. This query returns a number of columns and tables. Now, I want to determine the name of the database that corresponds to the returned table names. How do I accomplish this?
views:
35answers:
2
+2
A:
mysql> describe information_schema.columns;
+--------------------------+
| TABLE_CATALOG |
| TABLE_SCHEMA | <=== this one (schema == database)
| TABLE_NAME |
| COLUMN_NAME |
.......
Wrikken
2010-09-17 13:11:20
na.fa
2010-09-17 13:32:08