+ 2
If in a table, for gender column the males are marked as F and the females are marked as M by mistake. In one query how can we replace and correct this problem.
3 odpowiedzi
+ 5
You can use case function. 
Here is the query :
Update table_name set gender=(case gender when 'M' then 'F'  else 'M' end) ;
0
Is there any way to do it with replace function ?
0
In replace function you can change  only  one value of a single column if you  use this column using comma once again it will show an error  of duplicate column name, you can't alternate the record at a time 



