From the course: Learning Oracle Database 19c

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Delete rows from a table

Delete rows from a table

- [Instructor] At some point, you'll want to delete rows from a table. You might want to delete one row, many rows, or all of the rows. Let's cover how to use the DELETE statement to delete rows from a table, and of course, all the caveats and warnings that surround the removal of rows from a table. Here's the syntax of the DELETE statement. You delete zero, one, or many rows with DELETE. The only other parameter in the delete clause is table; what table you want to delete rows from. The FROM keyword is optional, but definitely more readable. The only other clause in the DELETE statement is the WHERE clause, the condition is any logical expression. It can have constants, columns compared to each other, and so forth. In other words, the same logical expression you'd use in a SELECT statement. Here, you are looking at all of the new rows in the departments table. They happen to be at the end, and they all have department ID numbers greater than 900. You have to delete those rows, so…

Contents