Skip to content

Instantly share code, notes, and snippets.

@ArCiGo
Last active May 19, 2019 21:38
Show Gist options
  • Save ArCiGo/7431cb1b95d5ceb9dd46420f69ce13a8 to your computer and use it in GitHub Desktop.
Save ArCiGo/7431cb1b95d5ceb9dd46420f69ce13a8 to your computer and use it in GitHub Desktop.
SELECT cus.FirstName,
cus.LastName
FROM Customer cus;
GO
/** Output **/
FirstName LastName
---------------------------------------- ----------------------------------------
Paolo Accorti
Pedro Afonso
Maria Anders
Miguel Angel Paolino
Victoria Ashworth
Bernardo Batista
Helen Bennett
Christina Berglund
...
SELECT *
FROM Customer;
GO
/** Output **/
Id FirstName LastName City Country Phone
----------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- --------------------
1 Maria Anders Berlin Germany 030-0074321
2 Ana Trujillo México D.F. Mexico (5) 555-4729
3 Antonio Moreno México D.F. Mexico (5) 555-3932
4 Thomas Hardy London UK (171) 555-7788
5 Christina Berglund Luleå Sweden 0921-12 34 65
6 Hanna Moos Mannheim Germany 0621-08460
...
SELECT (cus.FirstName + ' ' + cus.LastName) AS FullName --"Full Name"
FROM Customer cus;
GO
/** Output **/
FullName
---------------------------------------------------------------------------------
Paolo Accorti
Pedro Afonso
Maria Anders
Miguel Angel Paolino
Victoria Ashworth
Bernardo Batista
Helen Bennett
Christina Berglund
Jonas Bergulfsen
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment