Posted By

philsown on 11/16/12


Tagged

mysql database sql column


Versions (?)

What MySQL Table Has What Column


 / Published in: MySQL
 

How to find a given column in a given database in MySQL

  1. SELECT DISTINCT TABLE_NAME, COLUMN_NAME
  2. FROM INFORMATION_SCHEMA.COLUMNS
  3. WHERE COLUMN_NAME LIKE '%column_name%'
  4. AND TABLE_SCHEMA = 'database_name'

Report this snippet  

You need to login to post a comment.