How can I find which column is the primary key of a table by using a query?
LEFT joining table_constraints seems to take more time on mine. i use Information_schema.COLUMNS
SELECT TABLE_SCHEMA , TABLE_NAME , COLUMN_NAME FROM Information_schema.Columns WHERE COLUMN_KEY = "PRI" AND TABLE_SCHEMA = DATABASE()