From the course: Oracle Database 12c: Basic SQL

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Deleting rows for a table

Deleting rows for a table - Oracle Database Tutorial

From the course: Oracle Database 12c: Basic SQL

Start my 1-month free trial

Deleting rows for a table

- [Narrator] In addition to inserting records into our database tables, we can also use the DML delete command to delete existing rows from our tables. For example, let's select all of the data that we have in the test table one demo table which we created earlier. I can choose to delete one or more rows by typing delete from specifying the table name, such as test table one, where and then specify a condition, such as column two equals seven. Executing this command, I would expect only the first row to be deleted from my table, as this is the only row where column two has a value of seven. Let's verify. The output we got from the database was that one row was deleted. Let's run our sequel query again and see that, indeed, the first row is missing. I can also choose to delete additional rows. For example, let's delete all of the rows where column one has a value of hello. I'll type, delete from test table one where column one equals hello. Remember to enclose hello in quotations…

Contents