using postgresql v8.2
For example I have such a table:
id | va
-----+-----
123 | 234
123 | 234
123 | 456
234 | 123
234 | 345
456 | 678
(6 rows)
what I want is to query from the table to get randomly anyone with the same ID
it may like:
id | va
-----+-----
123 | 234
234 | 123
456 | 678
(3 rows)
or like:
id | va
-----+-----
123 | 456
234 | 345
456 | 678
(3 rows)
which value doesn't matter, but there have to be one. Thanks for proposing me any methods.