Can't complete SQL Lesson 4: Create


#1

Am I missing something here? I can complete the 1st instruction:

Add a row to the table. In the code editor type

INSERT INTO celebs (id, name, age) VALUES (1, 'Justin Bieber', 21);

but not the second:

To view the row you just created, under the INSERT statement type

SELECT * FROM celebs;

My code editor looks like this:

CREATE TABLE celebs (id INTEGER, name TEXT, age INTEGER);
INSERT INTO celebs (id, name, age) VALUES (1, 'Justin Bieber', 21);
SELECT * FROM celebs;

Any idea why this would fail out? The only error message I get is "Use the select statement to view the new row".


#2

Remove that line and you should be good.


#3

Had the same issue, thanks for the response! Why would we need to remove that line though?


#4

In real life you won't recreate the table every time you want to insert a new row. Can we assume that in this exercise that the table has already been created? I'm not sure. The code checker doesn't like it -- that's the only part that I'm sure of :smile:


#5

hello I had the same problem but we can’t solve it you need to click on run as much as you need to make button appear. this button will ask you if you want to get the code and just say yes.