Oracle answer.
Re: Insert or update a record if it already exists?
[sql]
merge into users U1
using (U1.username = 'Jo' )
when matched then
update set U1.email = 'jo@email.com'
when not matched then
insert(U1.email, U1.username)
values('Jo', jo@email.com);
[/sql]
|