I want to delete specific values/data from one column with the WHERE condition. Putting in another way, I don't want to delete the complete row. Is it possible?
You can use the WHERE clause with a DELETE query to delete the selected rows, otherwise all the records would be deleted.
To remove one or more rows in a table: First, you specify the table name where you want to remove data in the DELETE FROM clause. Second, you put a condition in the WHERE clause to specify which rows to remove. If you omit the WHERE clause, the statement will remove all rows in the table.
Example - DELETE Statement with more than One ConditionThe AND condition allows you to delete a record if all of the conditions are met. The OR condition deletes a record if any one of the conditions are met. Let's look at an example of how to use the DELETE statement with two conditions using the AND condition.
UPDATE YourTable SET columnName = null WHERE YourCondition
UPDATE myTable SET myColumn = NULL WHERE myCondition
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With