我有两张桌子
第一个看起来像这样:
Name|Sir Name|Adress
Max1|Musterma|Muster Street
Max2|Musterma|Muster Street
Max3|Musterma|Muster Street
Max4|Musterma|Muster Street
Max5|Musterma|Muster Street
第二个看起来像这样:
Name|Money
Max3|50.00
Max1|40.00
Max3|43.00
Max2|77.00
Max3|18.00
Max1|97.00
Max1|87.00
我想使用 Left Join 并制作这样的输出:
Max1|Musterma|Muster Street|40.00
Max1|Musterma|Muster Street|97.00
Max1|Musterma|Muster Street|87.00
Max2|Musterma|Muster Street|77.00
Max3|Musterma|Muster Street|50.00
Max3|Musterma|Muster Street|43.00
Max3|Musterma|Muster Street|18.00
Max4|Musterma|Muster Street|
Max5|Musterma|Muster Street|
我得到的是这样的:
Max3|Musterma|Muster Street|50.00
Max1|Musterma|Muster Street|40.00
Max3|Musterma|Muster Street|43.00
Max2|Musterma|Muster Street|77.00
Max3|Musterma|Muster Street|18.00
Max1|Musterma|Muster Street|97.00
Max1|Musterma|Muster Street|87.00
Max4|Musterma|Muster Street|
Max5|Musterma|Muster Street|
我得到的内容是在第二个(右)表的条目位置之后排序的。
但我想让列表排序
- 在用户的第一个位置之后
- 在第二个钱的位置之后
谁能告诉我我还要写什么?