SQL: Delete

This entry is part 15 of 20 in the series SQL Tutorial

Use the delete from command to delete row(s) from a table, with the following syntax:

delete from table

delete from table where condition

create table artiste
	(
 id int auto_increment primary key, 
 artiste varchar(30), 
 album varchar(50),
 year int(10)
 
 );

insert into artiste 
(artiste, album, year)
values
('Rod Stewart', 'Maggie May', 1973),
('New Order', 'Substance', 1987),
('Nirvana', 'Smell Like Teen Spirit', 1992),
('Rod Stewart', 'Out of Order', 1988);

delete from artiste where artiste='Nirvana';

Caution:  Always delete with a where clause.  Check with select statement before deleting.

Series Navigation<< SQL: Update
SQL: Let there be select >>