Open topic with navigation
DROP TABLE — remove a table
DROP TABLE [IF EXISTS] [CASCADE | RESTRICT] [
table_nameDROP TABLE [
table_name[IF EXISTS] [CASCADE | RESTRICT]
DROP TABLE statement to remove the table and all its data.
Only its owner may remove a table. A table may be emptied of rows, but not removed, by using
DELETE. You can also use
DROP TABLE always removes any indexes, triggers, and constraints that exist for the target table.
RESTRICT can occur before or after
table_name, but not both.
Note: From the release of NuoDB 3.4, the
CASCASE option is deprecated. The optional
CASCADE parameter no longer drops all tables in a table hierarchy list. Nor does it drop all tables containing foreign keys pointing to the dropped table. For more information on features deprecated in this release, see Deprecated Features.
Optional. The name of the schema that owns the table to be dropped. If schema is not provided, the table must be owned by the current schema.
Name (optionally schema-qualified) of an existing table to drop.
If the table does not exist and you specify
IF EXISTS, NuoDB does not generate an error. If not specified and the table does not exist, an error is generated.
CASCADE keyword is provided only for syntax compatibility and is ignored by NuoDB.
RESTRICT keyword is provided only for syntax compatibility and is ignored by NuoDB.
USE HOCKEY DROP TABLE hockey_fan;can't find table "HOCKEY_FAN"
DROP TABLE IF EXISTS hockey_fan; CREATE TABLE hockey_fan (id INTEGER GENERATED ALWAYS AS IDENTITY, name STRING ); DROP TABLE hockey_fan;