I got the table
ID
1
2
3
4
I want to get table like that.
ID Values
1 234
2 134
3 124
4 123
What i am trying to do is to add to each row ID from all other rows.
I tried to use except or not exists method but it doesn't work.
union_poly AS (
SELECT b.id FROM poly b
EXCEPT (SELECT * FROM poly ct)
--WHERE NOT EXISTS(SELECT * FROM poly ct WHERE b.id <> ct.id)
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.