External Exam Download Resources Web Applications Games Recycle Bin

Where

SELECT fields
FROM table
WHERE condition / filter

where1.sql

SELECT *
FROM menu
WHERE num == 3

/* in SQLite = is the same as ==,
but to be consistent with Python,
it is recommended you use == */

where2.sql

SELECT title, category, price
FROM menu
WHERE category == 'dessert'

/* put strings in quotation marks,
either single ' or double " */

where3.sql

SELECT title, description, calories
FROM menu
WHERE price == 19.95
  1. run the sample queries above
  2. show all fields in the table (*) for the item title "Chicken Nachos"
  3. write a query to show the description and price for entrees only