Reputation: 3
I created an access database and connected to C# code. In the database, I have 2 columns (ip and port). My question is how to find the same IP that connects to different value of port column. With other words, I want to search if the same IP connects to many different ports. Any idea?!!
Thank you
Upvotes: 0
Views: 64
Reputation: 99
SELECT ip FROM tableName GROUP BY ip HAVING COUNT(distinct port) > 1;
Upvotes: 0
Reputation: 171
SELECT ip FROM tablename GROUP BY ip HAVING COUNT(distinct port) > 1;
Upvotes: 1