Wednesday, 21 August 2013

mysql: getting primary key of a table programmatically

mysql: getting primary key of a table programmatically

How can I get primary key of some table programmatically ? I know I can
run some queries like "show create table" or "show keys" but after that I
will have to parse the result for primary key. Was wondering if there was
an easy way to do it.

No comments:

Post a Comment