1、完整response:
Error Code: 1064. 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 (Orders o) on p.Id_p=o.Id_P LIMIT 0, 1000' at line 2
2、两个表:
Orders:
Id_O, OrderNo, Id_P
'3', '22456', '1'
'4', '24562', '1'
'2', '44678', '3'
'1', '77895', '3'
'5', '34764', '65'
Persons:
Id_p, LastName, FirstName, Address, City
'1', 'Adams', 'John', 'Oxford-Street', 'London'
'2', 'Bush', 'George', 'Fifth-Avenue', 'NewYork'
'3', 'Carter', 'Thomas', 'Changan-Street', 'Beijing'
3、查询语句:
select (p.FirstName, FirstName),(p.LastName, LastName),(o.OrderNo ,OrderNo)
from (Persons p)
full join (Orders o)
on p.Id_p=o.Id_P;
问题:
19:39:32 select (p.FirstName, FirstName),(p.LastName, LastName),(o.OrderNo ,OrderNo)
from (Persons p)
full join (Orders o)
on p.Id_p=o.Id_P
LIMIT 0, 1000
Error Code: 1064. 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 (Orders o) on p.Id_p=o.Id_P LIMIT 0, 1000' at line 2 0.00031 sec