MySQL Forums
Forum List  »  Newbie

Re: getting primary key column name in mysql
Posted by: Paul McArdle
Date: July 01, 2005 04:37AM

SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.`COLUMNS` where TABLE_NAME = 'TABLENAME' AND COLUMN_KEY = 'PRI';

Options: ReplyQuote


Subject
Written By
Posted
Re: getting primary key column name in mysql
July 01, 2005 04:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.