Reputation: 3
I would like to replace a value Test
to Mess
in Column A
in a table T
where the value is Var
in Column B
in the same table.
Please someone help me with the query as I'm new to Oracle.
Upvotes: 0
Views: 30
Reputation: 875
This is very easy, try this:
UPDATE t
SET A = REPLACE(A, 'Test', 'Mess')
WHERE B = 'Var';
or if You want not replace, but full text update in A column, you can make like this :
UPDATE t
SET A = 'Mess'
WHERE B = 'Var' and A = 'Test';
Upvotes: 1