From the course: MySQL Essential Training (2019)
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Deleting data - MySQL Tutorial
From the course: MySQL Essential Training (2019)
Deleting data
- [Instructor] The delete statement is used to remove rows from a table. For this lesson, we'll use the scratch database as modified in the previous lessons. Here in MySQLWorkbench I'm connected with my admin connection and you'll notice my first line here is USE scratch and then I create a table with three columns and integer and two 16 character strings, and then I insert these five rows into the table. You'll notice that the A column is the same in the first row and in the fifth row. That's intentional, that's so that we can demonstrate some aspects of the delete statement. So I'm going to go ahead and shift + command + enter here on my Mac or you'll use shift + ctrl + enter on other operating systems to execute all of this at once. And there we go. And if I bring up my bottom tab here, you'll see that we have each of these commands, they're all successful and we have affected all those rows. Go ahead and close that for now, just for the limited space that I have on the screen…
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
-
-
-
A brief overview of SQL4m 39s
-
(Locked)
Database organization2m 58s
-
(Locked)
Selecting rows5m 32s
-
(Locked)
Selecting columns2m 26s
-
(Locked)
Counting rows2m 2s
-
(Locked)
Inserting data3m 14s
-
(Locked)
Updating data3m 56s
-
(Locked)
Deleting data4m 47s
-
(Locked)
Joining queries across tables4m 8s
-
(Locked)
Finding databases, tables, and columns1m 40s
-
-
-
-
-
-
-