From 756a13a148db6f3d4a3d36cecff4cae51882a245 Mon Sep 17 00:00:00 2001 From: Sorrel Harriet <s.harriet@gold.ac.uk> Date: Mon, 3 Oct 2016 15:36:27 +0100 Subject: [PATCH] update practice queries --- lab-2/music-store-app/sql/practice_queries.sql | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lab-2/music-store-app/sql/practice_queries.sql b/lab-2/music-store-app/sql/practice_queries.sql index b1006c3..f2872a1 100644 --- a/lab-2/music-store-app/sql/practice_queries.sql +++ b/lab-2/music-store-app/sql/practice_queries.sql @@ -1 +1,16 @@ -SELECT (name, price) FROM Album; +/* Here are some example RUD operations! +They're not all that sensible...maybe you'll +figure out why as we progress through the labs! */ + +/* Select all columns from Album table */ +SELECT * FROM Album; + +/* Selct only name and year columns from Album table +and where price > £15 */ +SELECT name, year FROM Album WHERE price > 15; + +/* Update the price of albums called 'Soul Rebel' */ +UPDATE Album SET price=21.99 WHERE name='Soul Rebel'; + +/* Delete artists with first_name Madonna (Yay!) */ +DELETE FROM Artist WHERE first_name='Madonna'; \ No newline at end of file -- GitLab