我的sql语句语法出错,请帮忙!

时间:2011-03-31 18:28:32

标签: mysql join

我不确定我在这里做错了什么,但我有一个synatx错误

SELECT * `Orders` o
LEFT JOIN Shipment s 
ON  o.for_shipment_id  = s.shipment_id
WHERE 'internal_status' = 'HAS_SHIP_INFO' 
AND (s.ship_method = 'FEDEX' OR s.ship_method = 'USPS' OR s.ship_method = 'UPS')

1 个答案:

答案 0 :(得分:2)

FROM后,您遗失了*

SELECT * 
  FROM   <-- You're missing this :o)
`Orders` oLEFT JOIN Shipment s ON  o.for_shipment_id  = s.shipment_idWHERE 'internal_status' = 'HAS_SHIP_INFO' AND (s.ship_method = 'FEDEX' OR s.ship_method = 'USPS' OR s.ship_method = 'UPS')