DATABASE Chapter 6

Query to return all rows from a table.

SELECT * FROM products.products

Query to return some rows from a table

SELECT * FROM products.products
WHERE CategoryID = 1;

Query that joins with another table to include related columns

SELECT *
FROM products.products
    JOIN products.categories
       ON products.CategoryID = categories.CategoryID
WHERE SKU = 'ALB008';

Leave a Reply

Your email address will not be published. Required fields are marked *