Skip to content

Instantly share code, notes, and snippets.

@ArCiGo
Created May 19, 2019 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArCiGo/6d323a1e92a06873fe15e64e9cfedd0c to your computer and use it in GitHub Desktop.
Save ArCiGo/6d323a1e92a06873fe15e64e9cfedd0c to your computer and use it in GitHub Desktop.
SELECT ord.OrderNumber,
ord.TotalAmount,
cus.FirstName,
cus.LastName,
cus.City,
cus.Country
FROM [ORDER] ord
INNER JOIN Customer cus ON ord.CustomerId = cus.Id;
GO
/** Output **/
OrderNumber TotalAmount FirstName LastName City Country
----------- --------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------------------------------
542378 440.00 Paul Henriot Reims France
542379 1863.40 Karin Josephs Münster Germany
542380 1813.00 Mario Pontes Rio de Janeiro Brazil
542381 670.80 Mary Saveley Lyon France
542382 3730.00 Pascale Cartrain Charleroi Belgium
542383 1444.80 Mario Pontes Rio de Janeiro Brazil
542384 625.20 Yang Wang Bern Switzerland
542385 2490.50 Michael Holz Genève Switzerland
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment