PostgreSQL常用语句1

前端之家收集整理的这篇文章主要介绍了PostgreSQL常用语句1前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
--查询出t_test表的relowner
select c.relname,c.relowner,a.rolname 
from pg_class c,pg_authid a where c.relowner=a.oid and c.relname='t_test';

--查询出某个索引的索引类型:
select c.relname,a.amname from pg_class c,pg_am a
where c.relam=a.oid and c.relname='tab_lei_1_c2_idx'

--查询出PG索引的类型:
select oid,* from pg_am
原文链接:https://www.f2er.com/postgresql/193104.html

猜你在找的Postgre SQL相关文章