col ordertype noprint
SELECT 1 ordertype, tblfavuser.*
FROM tblfavuser
WHERE not exists (select 1
from tbluser
where tbluser.id = tblfavuser.id)
UNION
SELECT 2, tbluser.*
FROM tbluser
WHERE not exists (select 1
from tblfavuser
where tblfavuser.id = tbluser.id)
order by 1
|