डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

Full Stack Web Development with Laravel

Full Stack Web Development with Laravel

Affiliate Program

Affiliate Program

MYSQL delete query

DELETE query is used to delete records from the table.

For this command, the given table will be taken as an example.

Table: users
id first_name last_name email
1 Ram Singh ram@gmail.com
2 Krishna Singh krishna@gmail.com
3 Ajay Singh ajay@gmail.com

 

Delete all records

DELETE FROM users;
Table: users
id first_name last_name email

 

Delete specific records

DELETE FROM users WHERE id=2;
Table: users
id first_name last_name email
1 Ram Singh ram@gmail.com
3 Ajay Singh ajay@gmail.com

 

© 2016 - 2023, All Rights are Reserved.