0
比方说,我有两个表:全部加入多列到另一个表的同一列
表“组合”
first second result
1 1 0
1 2 1
1 3 0
2 3 2
表“名称”
ID Name
1 Item1
2 Item2
3 Item3
我如何将这些一起加入到这样的输出中?基本上只是为了“查找”ID?在“组合”表
firstItem secondItem resultingItem
Item1 Item1 -
Item1 Item2 Item1
Item1 Item3 -
Item2 Item3 Item2
尝试此:SELECT(选择名称WHERE ID =第一)AS与firstItem,(SELECT姓名WHERE ID =第二)AS secondItem,(SELECT姓名WHERE ID =结果)作为结果物品组合 – live2