Using SHOW in Subquery

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
chris12295
Forum Contributor
Posts: 113
Joined: Sun Jun 09, 2002 10:28 pm
Location: USA
Contact:

Using SHOW in Subquery

Post 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
Post Reply