Is there a way to get the name of primary key field from mysql-database? For example:
I have a table like this:
+----+------+ | id | name | +----+---
use:
show columns from tablename where `Key` = "PRI";