clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2335898 fiddles created (27462 in the last week).

create table t(id int primary key,v varchar(10));
 hidden batch(es)


insert into t (id,v) values (3,'a'), (5,'b');
 hidden batch(es)


select * from t
id v
3 a
5 b
 hidden batch(es)


update t set id = case when id = 3 then 5 else 3 end where id in (3, 5);
Duplicate entry '5' for key 't.PRIMARY'
 hidden batch(es)


select * from t
id v
3 a
5 b
 hidden batch(es)