Here is my query .
SELECT user_record.password,user_addresses.street
FROM `user_record`
FULL OUTER JOIN `user_addresses`
ON user_record.id=user_addresses.user_id
ORDER by user_record.id
here is the error which is happening when i run my query in Phpmyadmin .
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OUTER JOIN `user_addresses` ON user_record.id=user_addresses.user_id ORDER by us' at line 1
Best Answer
Full outer join
is not supported. If you look at:https://dev.mysql.com/doc/refman/5.7/en/join.html
there is only
LEFT
andRIGHT
outer join. You can however mimicFULL OUTER
with aUNION
betweenLEFT
andRIGHT
:You have to include
user_record.id / user_addresses.user_id
in your select clause to be able to order by it.