Do You Want to Learn SQL?

Take our free eight day course, where I'll teach you in simple to understand English all you need to get started learning SQL.

-
DAYS
-
HOURS
-
MINUTES
-
SECONDS

Free Beginners SQL Course!

For test exercise we’ll use the PizzaDB. You can find link to the database script on GIT.

You don’t need to have a database installed to do these exercise, just use the prompts below.

In these exercise we’ll write some query using the Employee table. It has an EmployeeID columns in addition to the FirstName and LastName columns.

Exercise #1

Select all the values from the Employee Table.

select *
/* Answer */
select *
from Employee

Hint: If you are having troubles, you can press on the Show Answer button to see the query I wrote.

You can use * to specify every column.

Exercise #2

Select the FirstName and LastName from the Employee table.

/* Answer */
select FirstName, LastName
from Employee

Hint: Don’t forget to separate your columns with a comma.

Exercise #3

Select the ProductID, ProductName, NewPrice from the Product table, where  NewPrice is the Price plus .5

/* Answer */
select ProductID, ProductName, Price + .5 NewPrice
from Product

Hint: Don’t forget you can use mathematical expressions in your query and it is OK to alias the expression.