Is there a way to find out what the PRIMARY KEY is in a table? i.e. can I say 'SELECT PRIMARY KEY FROM mytable' and get the name of the column which is the primary key?
Does MySql have an utility program to create and alter tables? With this type of program you can see the structure of the database and all related items. S. van Els
SAvanEls@cq-link.sr
Sorry, I did'nt make myself clear on one point, I need to do this from inside Perl using the DBI, I know what the Primary key is, I made it, but I need to ask what it is from Perl. I made a workaround by doing EXPLAIN table, and regexp'ing it out of there, but I thought there would be a nicer way.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.