Gali
Gali

Reputation: 14973

update query question

i have this table MEN

Fname
aaa
bbb
ccc
aaa
aaa
bbb
ggg

i need query that replace all the aaa - in - ZZZ

Fname
ZZZ
bbb
ccc
ZZZ
ZZZ
bbb
ggg

how to do it on Oracle query ?

thanks in advance

Upvotes: 0

Views: 57

Answers (2)

jcomeau_ictx
jcomeau_ictx

Reputation: 38492

UPDATE MEN SET Fname='ZZZ' WHERE Fname='aaa';

see http://psoug.org/reference/update.html

Upvotes: 0

Alex R.
Alex R.

Reputation: 4754

Will work not only in Oracle

update MEN
set Fname='ZZZ'
where Fname='aaa';

Upvotes: 2

Related Questions