【发布时间】:2019-10-22 08:44:48
【问题描述】:
我面临一个棘手的问题。我希望你的专业知识能帮助我解决这个问题。
有2张桌子:
表 1:订单
Index ProductName OrderDate
0 a 03/03/1903
1 a 10/03/2014
2 b 01/01/2017
3 c 01/01/2019
表 2:产品规格 --> 此表显示了我们产品颜色所做的每一次更改
Index ProductName Color ColorUpdatedOn
0 a Blue 01/01/1900
1 a Red 01/01/2014
2 a Yellow 01/01/2017
3 b Pink 01/01/2017
4 c Black 01/01/2018
5 c Black 31/12/2018
我希望能够使用 Column Color et UpdatedOn 从 Table1 中检索所有数据
Index ProductName OrderDate Color ColorUpdatedOn
0 a 03/03/1903 Blue 01/01/1900
1 a 10/03/2014 Red 01/01/2014
2 a 01/01/2019 Yellow 01/01/2017
3 c 01/01/2019 Black 31/12/2018
你知道我该怎么做吗?
提前感谢您的帮助
拉哥
【问题讨论】:
-
您使用的是哪个 dbms?
-
看起来像基本的 JOIN。