查询当前库中, 所有的表里存在某个字段
sql
information_schema 是MySQL系统自带的数据库,提供了对数据库元数据的访问
information_schema.tables 指数据库中的表(information_schema.columns 指列)
table_schema 指数据库的名称
table_type 指是表的类型(base table 指基本表,不包含系统表)
table_name 指具体的表名
SELECT TABLE_NAME FROM information_schema. COLUMNS WHERE COLUMN_NAME = 'avg_rate';