Duplicate result

前端 未结 6 1538
走了就别回头了
走了就别回头了 2021-01-24 06:49

I am writing a query in SQL server2005. This is returning me a duplicate rows in the result. Can i eliminate this duplication with a particular column as the key?

6条回答
  •  囚心锁ツ
    2021-01-24 07:14

    As you have pointed out in the comments, you are using a stored procedure. One way to handle this case is to create a temporary table which you populate using the stored procedure. Then select the results from the temporary table and prune the duplicates with either SELECT DISTINCT or GROUP BY.

提交回复
热议问题