I have 3 tables, each consisting of a column called username. On the registration part, I need to check that the requested username is new and unique.
I need that si
select 1 from ( select username as username from tbl1 union all select username from tbl2 union all select username from tbl3 ) a where username = 'someuser'