SQL Delete Query With Example

.
SQL DELETE Statement - How To Delete a Record From a Table in SQL?

Delete query in SQL with Example




SQL Delete Statement 
IN SQL DELETE Query  is used to delete existing records in a table.



Syntax of Delete Statement 
The Basic Syntax For the DELETE table is as Follows

Option:1 
DELETE syntax for deleting the specified record from the table.

DELETE FROM table_name WHERE condition;


Option:2
DELETE Syntax to record all the Column From the table.

DELETE FROM table_name;

  • How to Delete a specific record From a Database? 

Example

DELETE FROM Student  WHERE StudentName='Ram;
Example Explanation
In the above Query, it will Delete the student whose name is Ram from the Student table.


  • How to Delete all records From a database?

Example

DELETE FROM Customers;
Explanation
In the above Query, it will Delete all the Row Present in the Student table It will not delete the table just Delete all the Columns.


Hope!!! The above tutorial on "DELETE Statement with Example" is helpful For you...

Team,
QA acharya

Tags: Delete Statement with the example, Delete statement example

Post a Comment

0 Comments