postgresql的show databases、show tables、describe table操作
1、相当与mysql的show databases;
select datname from pg_database;
2、相当于mysql的show tables;
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';public 是默认的schema的名字
3、相当与mysql的describe table_name;
SELECT column_name FROM information_schema.columns WHERE table_name ='table_name';
'table_name'是要查询的表的名字
延伸阅读
想要更系统地学习?推荐以下课程:
- MySQL实战45讲
林晓斌(丁奇) | MySQL性能优化核心技术,深入讲解索引原理 - Redis核心技术与实战
蒋德钧 | 这样学Redis,才能技高一筹

浙公网安备 33010602011771号