查询数据库存在特殊列字段的所有表的表名和字段名
列名不确定的话,可以选择用like来匹配
- mysql
select table_name,column_name from information_schema.columns where column_name = 'YYY'
- db2
select tabname,colname from syscat.columns where tabschema='XXX' and colname ='YYY'
Just Do Yourself!