sql insert into table from select without duplicates (need more then a DISTINCT)

前端 未结 5 581
渐次进展
渐次进展 2021-01-31 11:01

I am selecting multiple rows and inserting them into another table. I want to make sure that it doesn\'t already exists in the table I am inserting multiple rows into.

5条回答
  •  没有蜡笔的小新
    2021-01-31 11:35

    pseudo code for what might work

        insert into  select col1 etc 
    from  
    where .keycol not in 
    (select source_table.keycol from source_table)
    

提交回复
热议问题