Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

DELETE

Description

The DELETE statement is used to delete unnecessary data from the table.

Syntax

DELETE
FROM table_spec [ correlation ]
[ WHERE search_condition ] [ ; ]

correlation :
[ AS ] identifier [ {, identifier }... ]

table_spec :
single_table_spec 
( single_table_spec [ {, single_table_spec }... ] )

single_table_spec :
[ ONLY ] table_name
ALL table_name [ EXCEPT table_spec ]

  • table_name : Specifies the name of the table that contains the data to be deleted.
  • search_condition : Delete only the data that meets the search_condition using the WHERE Clause. If it is not specified, all the data in the table will be deleted.
Example
  • Example 1
  • The following is an example of deleting all the data from the stadium table keeping the table schema.

DELETE FROM stadium;

  • Example 2
  • The following is an example of deleting the information about the 1980 Moscow Olympics using the WHERE Clause.

DELETE FROM olympic WHERE host_year = 1980;