We can use AND and OR operators to combine multiple conditions in the WHERE clause of a DELETE command. Deleting Specific Rows Based on Multiple Conditions
More than one condition can be applied to the columns using a single query. We can also delete multiple rows using a single query.įrom the table displayed above, we need to delete all the employee records with salary less than 60000:Īs we can see, four rows have been deleted.The query above will result in the following: From the table above, we need to delete the record of the employee with the name “Arun”:Īs we can see, “Name” is of character string data type, so the value being specified has to be enclosed in single inverted commas, without which the system will return a syntax error.To check the result of the query in the table above, we’ll use the ‘SELECT *’ command:Īs we can see, one record has been deleted based on the condition specified in the WHERE clause.