From the course: Oracle Database 19c: Basic SQL

Unlock the full course today

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

DELETE rows with or without WHERE

DELETE rows with or without WHERE

From the course: Oracle Database 19c: Basic SQL

DELETE rows with or without WHERE

- [Instructor] In this lesson, you'll get the syntax of the DELETE statement and the rules for deleting one or more rows and what you'll put in the WHERE clause to limit the number of rows to delete, and you'll almost always want to limit the number of rows. The DELETE statement is the primary way you'll delete a row in a table but the TRUNCATE command is another way to perform and deletes all the rows in a table. First I'd like to define DML statements. Simply, they make changes to a table, they can add one or many rows by inserting into a table, updating them, deleting them, and even merging into them. With MERGE being a combo of the first three. TRUNCATE is sort of a DML statement in that it doesn't mass delete, but it's more of a DDL, data definition command. Any DML statement can affect zero, one, or many rows. In this lesson, we're going to focus on DELETE and TRUNCATE and deleting one row or multiple rows whether an OLTP or data warehouse system. The DELETE statement is really…

Contents