Return Unique set with “DISTINCT” and multiple other Selected columns

后端 未结 2 1148
孤城傲影
孤城傲影 2021-01-23 16:23

I am creating a view from multiple tables. Each table being included has a column named Contact_ID. I am using MS SQL 2005. I see that I can use DISTINCT to return a unique set

2条回答
  •  抹茶落季
    2021-01-23 16:52

    Initially misread the question, you will need to group all the data but if you want to show all the data and there are uniques, you need to use min or max in some cases, if someone has 2 phones...what do you want to show?

提交回复
热议问题