Skip to content

Instantly share code, notes, and snippets.

@thorsman99
Created May 29, 2018 08:12
Show Gist options
  • Save thorsman99/0b212258893a4fb306411dfdb00544a1 to your computer and use it in GitHub Desktop.
Save thorsman99/0b212258893a4fb306411dfdb00544a1 to your computer and use it in GitHub Desktop.
Inserts only rows not found in destination #sql
Insert into [server].database.dbo.table
select src.* from table src
left join [server].database.dbo.table sta
ON sta.Key = src.Key
where sta.Key IS NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment