Perfect! It's time to sum up your knowledge of using CTEs with data-modifying statements. In this part, you have learned how to use a:
- CTE with an
WITH all_customers AS (
INSERT INTO customers
- CTE with a
WITH products AS (
WHERE id IN (1,4,6,7)
SET price = price - 0.05
WHERE id IN (SELECT id FROM products);
- CTE with
WITH customer_remove AS (
WHERE first_name = 'Ema' and last_name = 'Green'
DELETE FROM customer
WHERE id = (SELECT id FROM customer_remove);
You also know how to use nested CTEs with
Let's do a short review before we move on to the final quiz for this course. Are you ready?