MySQL: Return all tables from 'select tables_names ...' -
i using:
select table_name tables information_schema.tables table_name 'address_%'
... list of table in database. advised use method, rather 'show tables', see:
mysql: show tables - define column name
... can name column (the clause, above, not available show tables).
as expected, gives me following output:
tables address_13e625c01bea04b1d311 address_147e32243c710542fb43 address_3b046272656fa61d7550 address_4f83b2740fc4f038775a etc.
if try , change select statement tables (not starting 'address_') of following:
select table_name tables information_schema.tables table_name '%' select table_name tables information_schema.tables table_name '' select table_name tables information_schema.tables
these return:
tables character_sets client_statistics collations collation_character_set_applicability columns column_privileges etc.
i don't know these values (database attributes looks of it), not list of tables in database (the 'address_' (from above) ones not there.
does know 'select table_name ...' statement should use, bearing in mind want name column (which why cannot use 'show tables') full list of tables in given database?
thank suggestions.
based on those, got answer, is:
select table_name 'table' information_schema.tables table_name '%'
this returns table names, in column named table.
thank all
Comments
Post a Comment