查找mysql数据库中所有包含特定名字的字段所在的表

it2022-05-09  31

sql语句如下:select * from INFORMATION_SCHEMA.columns where COLUMN_NAME Like '%placement%';

placement为字段名

例如,查询包含字段userId的表,在navica中的执行结果如下:

 

附:查询数据库中所有表名称的语句 SELECT table_name, table_type, engine FROM information_schema.tables WHERE table_schema = '数据库名称' ORDER BY table_name DESC; 


最新回复(0)