So, I have this temp table, which has a structure like:
col1 col2 col3 col3
intID1 intID2 intID3 bitAdd
I am doing a combination of the values of this temp table with a select query and storing it in the same temp table. The fact is that col3 is not part of the join request, I will need to update the table later.
So, I do like this:
Insert into
(
intID1,
intID2,
intID3
)
select intID1,intID2,intID3
From
UNION
select intID1,intID2,intID3
From
Table A
The problem is that I want to add only rows that do not yet exist in the temp table. As a result, this will add a duplicate of the existing row (since the union will return one row). How to insert only those rows that do not exist in the current temp table in my join request?
source
share