flybywire
flybywire

Reputation: 273582

mysql: get all tables in database that have a column called xyz

mysql: get all tables in database that have a column called xyz

Upvotes: 2

Views: 651

Answers (1)

Town
Town

Reputation: 14906

Both SQL Server and MySql have the Information_Schema.Columns table: http://dev.mysql.com/doc/refman/5.1/en/columns-table.html

select c.table_name from 
information_schema.columns c 
where c.column_name = 'xyz'

Upvotes: 7

Related Questions