postgresql jdbc命令转换

前端之家收集整理的这篇文章主要介绍了postgresql jdbc命令转换前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

http://www.linuxscrew.com/2009/07/03/postgresql-show-tables-show-databases-show-columns/

Postgresqlis one of the best database engines for an average web project and many who moves topsqlfrom MysqL (for example) often ask the following questions: what is the analog of “show tables” in postgres? or how can I get the list of databases in postgres like “show databases” in MysqL? The answers are short:

MysqL:SHOW TABLES
postgresql:\d
postgresql:SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';

MysqL:SHOW DATABASES
postgresql:\l
postgresql:SELECT datname FROM pg_database;

SHOW COLUMNS
postgresql:\dtable
postgresql:SELECT column_name FROM information_schema.columns WHERE table_name ='table';

DESCRIBE TABLE
postgresql:\d+table
postgresql:SELECT column_name FROM information_schema.columns WHERE table_name ='table';

原文链接:https://www.f2er.com/postgresql/194323.html

猜你在找的Postgre SQL相关文章