Question: SQL Step 2 Now assign each item a price, using UPDATE - item 1 should be 10 dollars, item 2 should be 20 dollars, item

SQL Step 2

Now assign each item a price, using UPDATE - item 1 should be 10 dollars, item 2 should be 20 dollars, item 3 should be 30 dollars. When you're done, do another SELECT of all the rows to check that it worked as expected.

CREATE TABLE clothes ( id INTEGER PRIMARY KEY AUTOINCREMENT, type TEXT, design TEXT); INSERT INTO clothes (type, design) VALUES ("dress", "pink polka dots"); INSERT INTO clothes (type, design) VALUES ("pants", "rainbow tie-dye"); INSERT INTO clothes (type, design) VALUES ("blazer", "black sequin"); alter table clothes add price text;

select * from clothes;

update clothes set price = '10 dollars' where id = 1; update clothes set price = '20 dollars' where id = 2; update clothes set price = '30 dollars' where id = 3; select * from clothes;

I believe my code is correct but somehow isn't letting me get to the next step on Khan academy! What's the correct code?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!