External Exam Download Resources Web Applications Games Recycle Bin

<, > & Like

rangelike1.sql

SELECT title, price
FROM menu
WHERE price > 15.00
  AND price <= 19.95

rangelike2.sql

SELECT title
FROM menu
WHERE title LIKE '%chicken%'

rangelike3.sql

SELECT title
FROM menu
WHERE title LIKE 'Chicken%'
  1. Explain the difference between < and <=.
  2. Explain or research how the % wildcards (used in conjunction with LIKE) work in these three examples:
    • '%chicken'
    • 'Chicken%'
    • '%chicken%'
  3. Show all the fields for items that have the word "lettuce" somewhere in their description
  4. Show the title, category and price of foods that have calories GREATER THAN 1000