Postgres 命令
--登录数据库
psql -h localhost -U pvincent -d chezhu
--显示数据库
vincent=# \l
--切换数据库
vincent=# \c chezhu
You are now connected to database "chezhu" as user "vincent".
--显示表
chezhu=# \dt
List of relations
Schema | Name | Type | Owner
--------+-------------------------+-------+----------
public | m_brand | table | pvincent
public | m_brand_factory_mapping | table | pvincent
public | m_factory | table | pvincent
public | m_family | table | pvincent
public | m_model | table | pvincent
(5 rows)
--删除表
chezhu=# DROP TABLE m_brand_factory_mapping;
DROP TABLE