在PostgreSQL中,您可以刪除不再需要的數(shù)據(jù)庫。應(yīng)該遵循以下操作步驟:
提示:考慮到 pgAdmin4 在Windows 10運行不夠穩(wěn)定,Query Tool經(jīng)常出現(xiàn)連接失敗等問題,這篇文章開始,我們安裝并使用 pgAdmin3 。
在這里,我們將刪除數(shù)據(jù)庫“testdb”。
右鍵單擊數(shù)據(jù)庫:testdb,左鍵單擊delete/drop選項。將收到以下彈出框。
點擊“是(Yes)”完全刪除數(shù)據(jù)庫“testdb”。
看到結(jié)果:
現(xiàn)在,可以看到已經(jīng)刪除了數(shù)據(jù)庫:testdb,它不顯示在左側(cè)列表中了。
postgres=# drop database testdb;
DROP DATABASE
postgres=#