标签:form color schema sel blog com and code 数据库名
SELECT ii.`COLUMN_NAME` FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS ii WHERE ii.`CONSTRAINT_SCHEMA`=‘xius‘ AND ii.`TABLE_NAME`=‘comment_user‘ AND ii.`REFERENCED_COLUMN_NAME` != ‘null‘;
xius: 数据库名
comment_user: 表名
mysql获取外键, 根据数据库名和表名获取表所对应的所有外键
标签:form color schema sel blog com and code 数据库名
原文地址:http://www.cnblogs.com/007sx/p/6445620.html