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 - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Introduction to DML and DDL commands2m 7s
-
(Locked)
Creating a simple table2m 1s
-
(Locked)
Inserting a new row to a table3m 15s
-
(Locked)
COMMIT and ROLLBACK2m 23s
-
(Locked)
Introduction to transactions3m 43s
-
(Locked)
Deleting rows for a table3m 23s
-
(Locked)
Updating values2m 40s
-
(Locked)
Multiple-statement transactions2m 41s
-
(Locked)
Truncating all data from a table2m 29s
-
(Locked)
Adding and dropping columns from a table3m 4s
-
-
-
-