首页 > 数据库 >postgreSQL 查询表结构

postgreSQL 查询表结构

时间:2023-03-06 17:56:47浏览次数:43  
标签:postgreSQL DISTINCT tablename ts 查询 pg SELECT 结构

SELECT DISTINCT C.relname AS tabname,obj_description ( C.oid ) AS COMMENT  FROM (SELECT DISTINCT tablename, schemaname FROM pg_tables WHERE  POSITION ( '_2' IN tablename ) = 0) ts 	
    LEFT JOIN pg_class C ON C.relname = ts.tablename WHERE 	obj_description ( C.oid ) is not  null;

标签:postgreSQL,DISTINCT,tablename,ts,查询,pg,SELECT,结构
From: https://www.cnblogs.com/ikai/p/17184793.html

相关文章