As commitment to our database literacy campaign, we're offering our Database Foundations course—for FREE!

Skip to main content
Completion requirements

Example 1: Retrieving all data from a table

SELECT * FROM Customers;

This query retrieves all columns and all rows from the Customers table.

Example 2: Retrieving specific columns

SELECT FirstName, LastName, Email FROM Customers;

This query retrieves only the FirstName, LastName, and Email columns from the Customers table.

Example 3: Filtering data with WHERE

SELECT * FROM Products 
WHERE Price > 50;

This query retrieves all columns from the Products table, but only for products with a price greater than 50.

Example 4: Sorting results

SELECT ProductName, Price FROM Products
ORDER BY Price DESC;

This query retrieves product names and prices, sorted by price in descending order (highest to lowest).

Last modified: Tuesday, 8 April 2025, 8:40 PM