How to use DELETE Command in SQL
In this post, you will learn how to use DELETE command in SQL.
DELETE command is used to DELETE record in table. DELETE command is always used with WHERE clause. If you don't use WHERE Clause, all record will be DELETE in table so while using DELETE command, you must be carefull.
Syntax of DELETE command:
DELETE From Table_Name
WHERE Column_Name='Values' ;
Suppose we have source table:
Now i'm going to update Emp_Name: Mohan to "Mahesh". Now use below code to Update existing record
DELETE FROM EMP
WHERE Emp_ID=3;
Now after executing this code, you will get below results: