查询包含某字段的表都有哪些
查询SQL如下:
SELECT b.oid, b.relname, att.attname, b.relkind, attinhcount, atttypmod FROM pg_attribute att, pg_class b WHERE b.oid = att.attrelid AND att.attname = 'user_name' --可以模糊查询 '%column_name%' AND attinhcount IN ( 0 ) AND b.relkind IN ( 'r' ) ORDER BY b.relname, atttypmod;