Delete Query in MYSQL by R4R Team

MYSQL DELETE Query:
-Basically, MySql Delete Query are used to delete the some record of the table within the database according to the specified condition.

Syntax:
DELETE FROM table_name WHERE condition;

SELECT * FROM library;

Id Stud_name Book_id
1 Aman 234
2 Ram 213
3 Ramesh 81
4 John 567

Now delete the record of the student which have Id=2

DELETE FROM library WHERE Id=2

SELECT * FROM library;

Id Stud_name Book_id
1 Aman 234
3 Ramesh 81
4 John 567


Leave a Comment: