By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table table1(col1 varchar(50), col2 varchar(50));
insert into table1 values('AB','AB123');
insert into table1 values('BC123','SG');
insert into table1 values('BG274','HF');
insert into table1 values('DC','DG789');
insert into table1 values('DG156','HD');
select col1 from table1 where col1 regexp '[A-Za-z][0-9]'
union
select col2 from table1 where col2 regexp '[A-Za-z][0-9]'
col1 |
---|
BC123 |
BG274 |
DG156 |
AB123 |
DG789 |