Delete specific values from column with where condition?
Here, I want to delete values/data from specific one column with the WHERE condition. I don't want to delete the complete row. It is possible like--
UPDATE TABLE SET columnName = null WHERE YourCondition
OR
The general form for this would be an
UPDATE
statement:UPDATE <table name>
SET
ColumnA = <NULL, or '', or whatever else is suitable for the new value for the column>
WHERE
ColumnA = <bad value> /* or any other search conditions */
Example:
In following table, I want delete Address of student which id is 2.
Here we write query for that as follows:
UPDATE Student
SET
Address = NULL
WHERE
Id = 2;
and Result is as follows:
Conversion Conversion Emoticon Emoticon