DELETE QUERY



MySQL - Delete Query


MySQL DELETE statement is used to delete a single record or multiple records from a table in MySQL.


SYNTAX

DELETE FROM table_name
WHERE condition;




First lets take a table with student details and check how DELETE works:


StudentIdStudentclassStudentmarks
1fifth500
2sixth465
3seventh520
4eighth450
5ninth555

Example - With One condition


DELETE FROM studentinfo
WHERE Studentclass = 'eighth';


Result will be displayed as follows:

StudentIdStudentclassStudentmarks
1fifth500
2sixth465
3seventh520
5ninth555

DELETE * FROM studentmarks


--------Result-------

# Before deleting system asks for the confirmation to delete or not.Then entire table gets deleted


MySQL TRIGGERS

MySQL - Triggers

posted on 2019-11-29 21:44:07 - mysql Tutorials


Grant_ Revoke Privilege

MySQL - Grant_ Revoke Privilege

posted on 2019-11-26 23:15:04 - mysql Tutorials


MySQL Vs SQL

MySQL Vs SQL

posted on 2019-11-25 05:02:26 - mysql Tutorials


Prompt Examples

ChatGPT Prompt Examples

posted on 2023-06-21 22:37:19 - ChatGPT Tutorials


Use Cases

Chat GPT Key Use Cases

posted on 2023-06-21 21:03:17 - ChatGPT Tutorials


Prompt Frameworks

Prompt Frameworks

posted on 2023-06-21 19:33:06 - ChatGPT Tutorials