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

create table tables (id int auto_increment primary key, code varchar(10), `1_1` varchar(10), `1_2` varchar(10), `1_3` varchar(10), `1_4` varchar(10), `1_5` varchar(10));
 hidden batch(es)


insert into tables values (null, 'abc123', '', 'Admin', '', 'Admin', '')
 hidden batch(es)


select * from tables
id code 1_1 1_2 1_3 1_4 1_5
1 abc123 Admin Admin
 hidden batch(es)


SELECT code, '1_1' AS location FROM tables WHERE `1_1` = 'Admin' UNION SELECT code, '1_2' AS location FROM tables WHERE `1_2` = 'Admin' UNION SELECT code, '1_3' AS location FROM tables WHERE `1_3` = 'Admin' UNION SELECT code, '1_4' AS location FROM tables WHERE `1_4` = 'Admin' UNION SELECT code, '1_5' AS location FROM tables WHERE `1_5` = 'Admin'
code location
abc123 1_2
abc123 1_4
 hidden batch(es)