FULL OUTER JOIN一直ERROR?win10什么原因?
Topic sourcemysql 不支持FULL OUTER JOIN语法,只能左右连接两次结果UNION起来
SELECT s.id, s.name, s.class_id, c.name class_name, s.gender, s.score
FROM students s RIGHT JOIN classes c
ON class_id = c.id
UNION
SELECT s.id, s.name,s.class_id, c.name class_name, s.gender, s.score
FROM students s LEFT JOIN classes c
ON class_id = c.id;
- 1
石年618
SELECT s.id,s.name,s.class_id,c.name class_name,s.gender,s.score FROM students s FULL
OUTER JOIN classes c ON s.class_id = c.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 OUTER JOIN classes c ON
s.class_id = c.id' at line 1