mysql教程

超轻量级php框架startmvc

MySql获取某个字段存在于哪个表的sql语句

更新时间:2020-04-24 19:45:02 作者:startmvc
SELECTTABLE_SCHEMA,TABLE_NAMEFROMinformation_schema.`COLUMNS`WHERECOLUMN_NAME='col1'col1为子段名。
 
SELECT TABLE_SCHEMA,TABLE_NAME FROM information_schema.`COLUMNS` WHERE COLUMN_NAME = 'col1'

col1为子段名。 MySql 字段所在表