-
If necessary recreate your tables and records from previous Practical task.
-
Against your tables practice using comparison operators.
Use each of the following comparison operators:
Comparison Syntax Equal = Not equal != Greater > Greater or equal >= Less < Less or equal <= -
Against your tables practice string pattern matching.
Use each of the following string pattern matching options:
Pattern Syntax Strings starting with 'abc' 'abc%' Strings ending with 'abc' '%abc' 'abc' within the string '%abc%' Exactly X characters long '___' (3 here) _ can be any character 'a_c' -
Use the ORDER BY clause to:
- Sort your records
- Sort the results of a query.
-
Use DELETE to remove some records.
Try to use LIKE or NOT LIKE against strings in your tables, along with the following pattern matching clauses:
-
(See previous tasks)
SELECT *
FROM products
WHERE product_price < 600;SELECT *
FROM customers
WHERE last_name
LIKE 'Fo%';-
SELECT * FROM customers ORDER BY first_name;
SELECT * FROM customers WHERE age < 10 ORDER BY first_name;
DELETE FROM customers WHERE first_name LIKE 'John';