Skip to content

Instantly share code, notes, and snippets.

@gsampath127
Created October 11, 2019 20:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gsampath127/b69c0265db09676b55883302bb6cf148 to your computer and use it in GitHub Desktop.
Save gsampath127/b69c0265db09676b55883302bb6cf148 to your computer and use it in GitHub Desktop.
SELECT t.id fromid,t.Team fromteam,t1.id toid,t1.Team toteam
INTO #matches
FROM #Team t
INNER JOIN #Team t1 ON t.id <> t1.id
SELECT * FROM #matches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment