阅读背景:

重构tsql视图,该视图使用row_number()返回具有唯一列值的行

来源:互联网 

I have a sql view, which I'm using to retrieve data. Lets say its a large list of products, which are linked to the customers who have bought them. The view should return only one row per product, no matter how many customers it is linked to. I'm using the row_number function to achieve this. (This example is simplified, the generic situation would be a query where there should only be one row returned for each unique value of some column X. Which row is returned is not important)I have a sql view, which I'm using to retrieve




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: