摘要:
-- 查出哪些表有 phone 字段select a.relname 表名,b.attname 字段名,c.typname 字段类型 from pg_class a,pg_attribute b,pg_type c where a.oid=b.attrelid and b.atttypid=c.ty 阅读全文
摘要:
WITH RECURSIVE x AS( SELECT * FROM t_org WHERE orgid = '10001' UNION ALL SELECT b.* FROM x,t_org b WHERE x.orgid = b.parentorgid AND b.status = '1' )S 阅读全文