Quote:
i want to delete a particular value from the location column not the full row
It is not wise to store comma separated values in a field if you intend to manipulate them via sql. It is against the normal form (3NF), and thus there are little support to do that correctly.
You have not specified the RDBSM - SQL is a standard, nothing more - thus the exact answer would be:
you can not.
Let's assume you use Microsoft SQL Server - thus you can.
The best option would be to make a .net integrated data type for that.
The quickest answer would be:
update table set location = replace(location,'kochi','')
But in your case it would become:
tvm,,india
(remark the double commas). If it is acceptable, than that's it.
If not, you could also issue an other DML statement too to reduce double commas:
update table set location = replace(location,',,',',')
. And now an other problem: if the value is substring of an other you could make wrong deletions.
You could also use regular expressions, but that's also missing by default.
What I am suggesting is using a special notation instead of comma separation:
[tvm][kochi][india]
. Thus you would not have such hazards, and the deletion would be as simple as this:
update table set location = replace(location,'[kochi]','')
There are other options too, but let's see what you really want/can do.