The code below works fine up till the point i try to order it by name.
first time working with union so little confused on how to order these tables together when the first column names are different.
SELECT
e.emp_name 'Name',
e.emp_gen 'Gender',
('Employee') 'Role'
FROM employee e
ORDER BY e.emp_name ASC
UNION ALL
SELECT
s.sup_name 'Name',
s.gen 'Gender',
('Supervisor') 'Role'
FROM supervisor s
ORDER BY s.sup_name ASC;
EDIT
have now tried this but doesn't seem to work as well
SELECT
e.emp_name 'Name',
e.emp_gen 'Gender',
('Employee') 'Role'
FROM employee e
UNION ALL
SELECT
s.sup_name 'Name',
s.gen 'Gender',
('Supervisor') 'Role'
FROM supervisor s
ORDER BY s.sup_name ASC;