
We can see that the ' backup_employee' table is no longer available.
#POSTGRESQL DELETE TABLE IF EXISTS UPDATE#
We can verify this by clicking the refresh button or pressing the F5 on our keyboard to update the object list. Step 6: If everything is correct, the selected table will be removed from the database. Click on the OK button to delete the database from the SQL Server permanently.

Step 3: Once we click on the Delete option, we will see the Delete Model Object box to confirm the deletion process. Now, select the Delete option from the appeared menu. Step 2: Select your desired table that is no longer required in your database and right-clicks on it to get the pop menu. Step 1: Open the SSMS and then navigate to the Object Explorer-> Database -> Tables folder.
#POSTGRESQL DELETE TABLE IF EXISTS HOW TO#
The following steps explain how to delete a table using SSMS: We can also use the SSMS to drop a table from the database. See the below output: DROP TABLE using SQL Server Management Studio However, if we try to delete a table that is not available in the database with the IF EXISTS clause, SQL Server does not show any error or warning message. If we try to remove a table that does not exist in the database, SQL Server will through the following error message: If we re-access this table, we will get an error message as shown in the below output: If we want to drop this table from the database, we can use the statement as follows: Suppose our database has a table named " student_data" containing the following data: This example specifies how we can drop an existing table from the database. NOTE: We must have an ALTER privilege on the schema to which the table belongs and CONTROL privilege on the table to execute the DROP TABLE statement.

If we want to do this, we will first remove the referencing foreign key constraint or the table.
