Thursday, February 13, 2014

Find table column in MySQL

The following query is used to show all columns in each table in a database

SELECT * FROM information_schema.columns
WHERE table_schema = 'db_name'
ORDER BY table_name,ordinal_position

No comments:

Post a Comment