I have result set like this :
A B
-------
1 10
2 10
2 10
3 10
4 10
5 10
I am selecting the values of A corresponding to value of B e.g corresponding to 10 as value of B There are different values of A such as 1, 2, 2, 3, 4, 5.
I want to know that is there a repeated value in A for any value of B. As in this case 2 is repeated so answer in this case is YES.
In standard ANSI SQL you could simply use GROUP BY:
This will return every combination of
aandbfor which there is more then one row and it will work on every RDBMS specified.