
In this example, we try to delete a table nothing from the database school. Response 0 row(s) affected Negative Scenario SQL Statement DROP TABLE IF EXISTS school.students We execute the DELETE TABLE IF EXISTS query/statement and observe the result.

The database and the table in it are present. In this example, we try to delete a table students from the database school. SQL DROP TABLE IF EXISTS Query to drop the table table_name from the schema schema_name present in the database database_name is DROP TABLE IF EXISTS database_name.schema_name.table_name Įxamples DROP TABLE IF EXISTS _players ĭROP TABLE IF EXISTS Examples Positive Scenario SQL DROP TABLE IF EXISTS Query to drop the table table_name from the schema schema_name is DROP TABLE IF EXISTS database_name.table_name Įxamples DROP TABLE IF EXISTS school.baseball_players ĭROP TABLE IF EXISTS organization.employees DROP TABLE IF EXISTS from Specified Schema in Specific Database SQL DROP TABLE IF EXISTS Query to drop the table table_name from the schema schema_name is DROP TABLE IF EXISTS schema_name.table_name Įxamples DROP TABLE IF EXISTS athletes.baseball_players ĭROP TABLE IF EXISTS shipping.employees DROP TABLE IF EXISTS from Specified Database SQL DROP TABLE IF EXISTS Query to drop the table table_name is DROP TABLE IF EXISTS table_name Įxamples DROP TABLE IF EXISTS baseball_players ĭROP TABLE IF EXISTS employees DROP TABLE IF EXISTS from Specified Schema Name of the database in which the specified schema or table exists.

Name of the schema in which the table exists.

Name of the table which has to be dropped. The syntax of a SQL DROP TABLE IF EXISTS statement is DROP TABLE IF EXISTS table_name ĭROP TABLE IF EXISTS schema_name.table_name ĭROP TABLE IF EXISTS database_name.table_name ĭROP TABLE IF EXISTS database_name.schema_name.table_name
