Determine MySQL table’s primary key dynamically
- 06 Oct, 2011
- read
You may have been in a situation which you may need to figure out what is the PRIMARY key field of a given table. Or even if it is a compound key what are the columns building the PRIMARY key. This usually helps a lot when you’re making some generic tools to do some jobs on a given table.
Continue Reading