What MySQL Table Has What Column


/ Published in: MySQL
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.