PostgreSQL-数据库命令
连接数据库
-- 默认连接,连接postgres数据库 psql -- 指定配置连接数据库 psql -h localhost -p 5432 -U postgress dbname
查看数据库
\l
切换数据库
\c dbname
查看数据库中的表
\d
查看表的详细信息
\d tablename
-- 默认连接,连接postgres数据库 psql -- 指定配置连接数据库 psql -h localhost -p 5432 -U postgress dbname
\l
\c dbname
\d
\d tablename