This course covers the basics of working with SQL. Work your way through the videos and we'll teach you everything you need to know to interact with database management systems and create powerful relational databases!

Update & Delete

Lesson 9
Author : Mike Dane
Last Updated : December, 2017

Code

CopyDELETE FROM student;
DELETE FROM student
WHERE student_id = 4;
DELETE FROM student
WHERE major = 'Sociology' AND name = 'Kate';
UPDATE student
SET major = 'Undecided';
UPDATE student
SET name = 'Johnny'
WHERE student_id = 4;
UPDATE student
SET major = 'Biological Sciences'
WHERE major = 'Biology';
UPDATE student
SET major = 'Biosociology'
WHERE major = 'Biology' OR major = 'sociology'
UPDATE student
SET major = 'Undecided', name = 'Tom'
WHERE student_id = 4;