'Is there a way to return rows from two tables where I only need the duplicate values from one column? SQL
Is there a way to return rows from two tables where I only need the duplicate values from one column in SQL?
Basically I have two tables I have joined together, People_Details & People_Holidays. I need to return most columns from these tables but for one column which is the People_ID column I need to return values where there is more than one entry. So for example:
I don't want these rows:
35
57
132
I do want:
227
227
227
333
333
333
333
The reason for this is the other details will be different.
Any help much appreciated.
I have tried the having clause people_ID > 1 etc. but no luck so far.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
