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 don't want to delete if you're wanting to leave the row itself intact. You want to update the row, and change the column value.
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 */
UPDATE YourTable SET columnName = null WHERE YourCondition
Try this SQL statement:
update Table set Column =( Column - your val )
You can also use REPLACE()
:
UPDATE Table
SET Column = REPLACE(Column, 'Test123', 'Test')
UPDATE myTable
SET myColumn = NULL
WHERE myCondition