SQL · Schema and constraints

drop table

Removes a table and its data. IF EXISTS makes it safe to rerun a script.

Syntax
drop table if exists name

Example

Open in the lab

More in this group

alter table check create table create unique index default foreign key index not null

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course