INFORMATICS

The Best

Przełącznik języka

Zaproś mnie na KAWE

Jeżeli podoba Ci się strona i chcesz wspomóc projekt!

Postaw mi kawę na buycoffee.to

This Site

Płatnik

CMS

Hardware

Uncategorised

Emulators

Powershell

Storage Array

DNS

Antivirus program

Licznik

3.png0.png4.png1.png9.png1.png3.png
Today810
Yesterday1207
This week6795
This month16814
Total3041913

Visitor Info

  • IP: 3.145.97.235
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

7
Online

piątek, 22 listopad 2024 14:53

Using DROP DATABASE

Gwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywna
 

Using DROP DATABASE

This command drops a database. It removes the catalog entries for the database and deletes the directory containing the data. It can only be executed by the database owner. This command cannot be executed while you or anyone else is connected to the target database (connect to postgres or any other database to issue this command).

Syntax

The syntax for DROP DATABASE is given below −

DROP DATABASE [ IF EXISTS ] name

Parameters

The table lists the parameters with their descriptions.

S. No.Parameter & Description
1

IF EXISTS

 

Do not throw an error if the database does not exist. A notice is issued in this case.

2

name

The name of the database to remove.

Example

The following is a simple example, which will delete testdb from your PostgreSQL schema −

postgres=# DROP DATABASE testdb;

 

Search