clear markdown compare help donate or buy diddy dollings comments/suggestions/bugs a leap of faith? bible365
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. 818564 fiddles created (9202 in the last week).

select version();
version()
8.0.19
 hidden batch(es)


create table emlchk ( check (email1 <> email2), emlchk_id int not null auto_increment, email1 varchar(100), email2 varchar(100), primary key (emlchk_id) )
 hidden batch(es)


select * from emlchk
emlchk_id email1 email2
 hidden batch(es)


insert into emlchk (email1, email2) values ('something@domain.com', 'something@domain.com')
Check constraint 'emlchk_chk_1' is violated.
 hidden batch(es)


select * from emlchk
emlchk_id email1 email2
 hidden batch(es)


insert into emlchk (email1, email2) values ('something_one@domain.com', 'something_two@domain.com'), ('something_one_one@domain.com', ''), ('','something_two_two@domain.com')
 hidden batch(es)


select * from emlchk
emlchk_id email1 email2
1 something_one@domain.com something_two@domain.com
2 something_one_one@domain.com
3 something_two_two@domain.com
 hidden batch(es)


update emlchk set email2 = 'something_one_one@domain.com' where email1 = 'something_one_one@domain.com'
Check constraint 'emlchk_chk_1' is violated.
 hidden batch(es)


select * from emlchk
emlchk_id email1 email2
1 something_one@domain.com something_two@domain.com
2 something_one_one@domain.com
3 something_two_two@domain.com
 hidden batch(es)


update emlchk set email1 = 'something_two_two@domain.com' where email2 = 'something_two_two@domain.com'
Check constraint 'emlchk_chk_1' is violated.
 hidden batch(es)


select * from emlchk
emlchk_id email1 email2
1 something_one@domain.com something_two@domain.com
2 something_one_one@domain.com
3 something_two_two@domain.com
 hidden batch(es)


update emlchk set email2 = 'something_one_two@domain.com' where email1 = 'something_one_one@domain.com'
 hidden batch(es)


update emlchk set email1 = 'something_two_one@domain.com' where email2 = 'something_two_two@domain.com'
 hidden batch(es)


select * from emlchk
emlchk_id email1 email2
1 something_one@domain.com something_two@domain.com
2 something_one_one@domain.com something_one_two@domain.com
3 something_two_one@domain.com something_two_two@domain.com
 hidden batch(es)