Use the DELETE statement to delete data.
Example:
Create Table
t1that contains the following data:obclient> CREATE TABLE t1(c1 int primary key, c2 int); Query OK, 0 rows affected (0.16 sec) obclient> INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4); Query OK, 4 rows affected (0.01 sec) Records: 4 Duplicates: 0 Warnings: 0 obclient> SELECT * FROM t1; +----+------+ | c1 | c2 | +----+------+ | 1 | 1 | | 2 | 2 | | 3 | 3 | | 4 | 4 | +----+------+ 4 rows in set (0.06 sec)Delete the column where
c1 = 2.
obclient> DELETE FROM t1 WHERE c1 = 2;
Query OK, 1 row affected (0.02 sec)
obclient> SELECT * FROM t1;
+----+------+
| c1 | c2 |
+----+------+
| 1 | 1 |
| 3 | 3 |
| 4 | 4 |
+----+------+
3 rows in set (0.01 sec)
For more information on the syntax of the DELETE statement, see the "DELETE" topic in SQL Reference (Oracle Mode).