select w.fname,w.salary, t.worker_title from Worker w full join Title t on w.worker_id=t.worker_ref_id; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'full join Title t on w.worker_id=t.worker_ref_id' at line 1
Asked
Active
Viewed 46 times
0
-
1MYSQL does not support FULL JOIN , google mysql full join for alternates. – P.Salmon Jul 29 '18 at 08:43
2 Answers
0
if you want result of full ouret join then use below way:
SELECT p.LastName, p.FirstName, o.OrderNo
FROM persons AS p
LEFT JOIN
orders AS o
ON o.orderNo = p.p_id
UNION ALL
SELECT NULL, NULL, orderNo
FROM orders
WHERE orderNo NOT IN
(
SELECT p_id
FROM persons
)

Sanjay
- 2,481
- 1
- 13
- 28