mysql链接4个表和一些条件

mysql链接4个表和一些条件,mysql,Mysql,我试图将这4个表关联起来,但我一直遇到问题。有人知道为什么吗 Part ( part_num, description, on_hand ) Order ( order_num, date, customer_id ) Order_line ( part_num, order_num, price ) Customer ( customer_ID, customer_name ) 我正试图为客户取订单号和日期,名称为“raymond”,描述为“

我试图将这4个表关联起来,但我一直遇到问题。有人知道为什么吗

Part (
  part_num,
  description,
  on_hand
)

Order (
  order_num,
  date,
  customer_id
)

Order_line (
  part_num,
  order_num,
  price
)

Customer (
  customer_ID,
  customer_name
)
我正试图为
客户
订单号
日期
,名称为
“raymond”
,描述为
“Foster”


我点击回车键,出现了:
,>
而不是
->

,您需要选择一个
部件。部件号
,如下所示,还转义了
顺序
它是一个关键字:

Select part.part_num,date
from `order`, part, order_line, customer
where `order`.order_num = order_line.order_num
and part.part_num = order_line.part_num
and `order`.customer_id = customer.customer_id
and customer_name = 'raymond' 
and description = 'stove' ;

你得到的是什么?你能摆弄一下样本数据吗?我什么都没有得到。它跑不了。当我点击输入通常从mysql->been>中获得的符号时,如果键入不平衡的引号,就会出现这种情况。我在你发布的查询中没有看到它,你一定键入了错误的内容。很抱歉,我的意思是说order_num,日期是我需要的。哦,好的,然后尝试转义
order
表,因为它是MySQL关键字。同样的事情。它跑不了。通常在mysql中,每当我按下enter键时,我都会看到这个符号->然后它是否工作或出现错误消息。但是当我做这个问题时,符号变成了“>,很难摆脱它。你是从MySQL命令行运行你的查询吗?我想是的。这方面我是新手。
Select part.part_num,date
from `order`, part, order_line, customer
where `order`.order_num = order_line.order_num
and part.part_num = order_line.part_num
and `order`.customer_id = customer.customer_id
and customer_name = 'raymond' 
and description = 'stove' ;