📅  最后修改于: 2022-03-11 15:05:05.344000             🧑  作者: Mango
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'Your Database'
AND TABLE_NAME = 'Your Table name'
AND COLUMN_KEY = 'PRI';
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'Your Database'
AND TABLE_NAME = 'Your Table name'
AND COLUMN_KEY = 'UNI';