📜  避免在sql代码示例中的一对多关系连接中重复

📅  最后修改于: 2022-03-11 15:05:24.854000             🧑  作者: Mango

代码示例1
SELECT columnlist, 
rn = ROW_NUMBER() OVER (PARTITION BY sales.salesID ORDER BY payment.paymentID)
FROM sales JOIN payments ON sales.salesID=payments.salesID