Skip to content

Instantly share code, notes, and snippets.

@ArCiGo
Created May 19, 2019 22:34
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/c2b8a3242640dfb6d391b4c49ab65776 to your computer and use it in GitHub Desktop.
Save ArCiGo/c2b8a3242640dfb6d391b4c49ab65776 to your computer and use it in GitHub Desktop.
SELECT ord.TotalAmount,
cus.FirstName,
cus.LastName,
cus.City,
cus.Country
FROM [ORDER] ord
RIGHT JOIN Customer cus ON ord.CustomerId = cus.Id
WHERE ord.TotalAmount IS NULL;
GO
/** Output **/
TotalAmount FirstName LastName City Country
--------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ----------------------------------------
NULL Diego Roel Madrid Spain
NULL Marie Bertrand Paris France
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment