Page 1 of 1

Using SHOW in Subquery

Posted: Fri Feb 08, 2008 9:10 pm
by chris12295
Is something like this possible?
SELECT Column_name FROM (SHOW INDEX FROM $_table) AS a WHERE a.Non_unique = 0

If not, how can I select the PRIMARY KEY column name for a table and use it in the same query? For example I need to say:
SELECT primary key FROM $_table WHERE $this->pKeyField = $this->pKey