I have a right outer join, that almost does what I want…
SELECT users_usr.firstname_usr, users_usr.lastname_usr, credit_acc.given_credit_acc, users_usr.created_usr, users_usr.sitenum_usr, users_usr.original_aff_usr, users_usr.id_usr FROM credit_acc right Outer Join users_usr ON credit_acc.uid_usr = users_usr.id_usr
The problem is, I want to add a
where credit_acc.type_acc = 'init'
But this gets rid of all users who don’t have a row in credit_acc… which is WHY I need a right outer join.
Is there a way to get this without having to do two queries and a union?
Or, as @Tomalak pointed out:
which may be faster (see comments).