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?
Asked
Active
Viewed 233 times
0
-
2Edit your question and provide sample data, desired results, and a better explanation of what you want to do. – Gordon Linoff May 28 '17 at 13:35
-
Check https://stackoverflow.com/questions/4732838/delete-specific-values-from-column-with-where-condition – Rohan May 28 '17 at 13:37
-
Do you want to remove values from the column (e.g. set them to `NULL`) or do you want to alter the table so that the column is no longer accessible? – Aug 20 '19 at 08:08
2 Answers
1
You can re-set values using update
:
update t
set col = NULL
where . . .;

Gordon Linoff
- 1,242,037
- 58
- 646
- 786
0
Yes it is possible to delete the particular value/data from the column using WHERE condition. You can use the below code in SQL command to delete that particular column.
Update Table_Name set Column_Name=null where Column_Id=xxx
or you can even update that by changing the Column_name value to an empty string ' ' Like below
Update Table_Name set Column_Name='' where Column_Id=xxx

Victor Ejiogu
- 1,184
- 14
- 23

ttr
- 11
- 7