I have multiple SELECT queries unioned. The composite primary key is preventing duplicates, which is what I want. Is there a way to increment a certain field whenever a duplicate row is prevented from being inserted from one of the unioned queries?
I have multiple SELECT queries unioned. The composite primary key is preventing duplicates, which
Share
You could use
UNION ALLto retain the duplicates, then group the result with an outer query: