w3resource

SQLite Exercise: Display the names using alias name "First Name", "Last Name"

Write a query to display the names (first_name, last_name) using alias name "First Name", "Last Name".

Sample table : employees


SQLite Code :

SELECT first_name "First Name",  last_name "Last Name" 
FROM employees;

Output:

First Name  Last Name
----------  ----------
Steven      King
Neena       Kochhar
Lex         De Haan
Alexander   Hunold
Bruce       Ernst
David       Austin
Valli       Pataballa
Diana       Lorentz
Nancy       Greenberg
Daniel      Faviet
John        Chen
Ismael      Sciarra
Jose Manue  Urman
Luis        Popp
Den         Raphaely
Alexander   Khoo
Shelli      Baida
Sigal       Tobias
Guy         Himuro
Karen       Colmenares
Matthew     Weiss
Adam        Fripp
Payam       Kaufling
Shanta      Vollman
Kevin       Mourgos
Julia       Nayer
Irene       Mikkilinen
James       Landry
Steven      Markle
Laura       Bissot
Mozhe       Atkinson
James       Marlow
TJ          Olson
Jason       Mallin
Michael     Rogers
Ki          Gee
Hazel       Philtanker
Renske      Ladwig
Stephen     Stiles
John        Seo
Joshua      Patel
Trenna      Rajs
Curtis      Davies
Randall     Matos
Peter       Vargas
John        Russell
Karen       Partners
Alberto     Errazuriz
Gerald      Cambrault
Eleni       Zlotkey
Peter       Tucker
David       Bernstein
Peter       Hall
Christophe  Olsen
Nanette     Cambrault
Oliver      Tuvault
Janette     King
Patrick     Sully
Allan       McEwen
Lindsey     Smith
Louise      Doran
Sarath      Sewall
Clara       Vishney
Danielle    Greene
Mattea      Marvins
David       Lee
Sundar      Ande
Amit        Banda
Lisa        Ozer
Harrison    Bloom
Tayler      Fox
William     Smith
Elizabeth   Bates
Sundita     Kumar
Ellen       Abel
Alyssa      Hutton
Jonathon    Taylor
Jack        Livingston
Kimberely   Grant
Charles     Johnson
Winston     Taylor
Jean        Fleaur
Martha      Sullivan
Girard      Geoni
Nandita     Sarchand
Alexis      Bull
Julia       Dellinger
Anthony     Cabrio
Kelly       Chung
Jennifer    Dilly
Timothy     Gates
Randall     Perkins
Sarah       Bell
Britney     Everett
Samuel      McCain
Vance       Jones
Alana       Walsh
Kevin       Feeney
Donald      OConnell
Douglas     Grant
Jennifer    Whalen
Michael     Hartstein
Pat         Fay
Susan       Mavris
Hermann     Baer
Shelley     Higgins
William     Gietz

Practice SQLite Online


Model Database

Employee Model  Database - w3resource online SQLite practice

Structure of 'hr' database :

hr database

Improve this sample solution and post your code through Disqus.

Previous: Basic SELECT statement
Next: Write a query to get unique department ID from employee table.

What is the difficulty level of this exercise?



Share this Tutorial / Exercise on : Facebook and Twitter