SELECT, WHERE, ORDER BY EXERCISES

¡Supera tus tareas y exámenes ahora con Quizwiz!

SELECT * FROM Customers ORDER BY Country, City;

Exercise: Select all records from the Customers table, sort the result alphabetically, first by the column Country, then, by the column City.

SELECT

Insert the missing statement to get all the columns from the Customers table.

SELECT * FROM Customers ORDER BY City;

Select all records from the Customers table, sort the result alphabetically by the column City.

SELECT * FROM Customers ORDER BY City DESC;

Select all records from the Customers table, sort the result reversed alphabetically by the column City.

WHERE CITY = 'Berlin'

Select all records where the City column has the value "Berlin".

SELECT WHERE AND PostalCode

Select all records where the City column has the value 'Berlin' and the PostalCode column has the value 12209.

SELECT * FROM Customers WHERE City = 'Berlin' OR City = 'London';

Select all records where the City column has the value 'Berlin' or 'London'.

WHERE CustomerID = 32

Select all records where the CustomerID column has the value 32.

SELECT DISTINCT

Select all the different values from the Country column in the Customers table.

WHERE NOT City = 'Berlin'

Use the NOT keyword to select all records where City is NOT "Berlin".

SELECT CITY FROM

Write a statement that will select the City column from the Customers table.


Conjuntos de estudio relacionados

Macroeconomics midterm study guide

View Set

Accounting 1 - 2017 Final Review

View Set

Amino Acids - Structure to full name

View Set

Basic Medical Terminology - Chapter 10 - The Nervous System and Mental Health

View Set

Chapter 4: Characteristics of Prokaryotic and Eukaryotic Cells

View Set

U Can Pass Life Insurance Chapter 2

View Set

Evolve EAQ: Psych- Foundations and Modes of Care

View Set

Strategic Management Final Exam 22

View Set

Chapter 3- Demand, Supply, and Market Equilibrium

View Set

NWM Life- Chapter 3, Life Insurance Policies

View Set

Wordly Wise 3000® Level 3, Lesson 10

View Set

World Regional Geography Chapter 4

View Set