Query isn't working in the SQL exercise. There is no RUN button

Hi I am doing the Intro to SQL create table exercise. The query is not working. How can I tell if my code is correct or not. There is no RUN button. This is quite frustrating. I have already checked the code by looking at the HINTS. Is this normal for things not to work in Code Academy?

Welcome to the forums!

Not sure what exercise you’re on.
The Run button is on the bottom, sort of left of the middle window in the learning environment.
or, you can select command + return on a macbook.

1 Like

Thank you. I am on Intro to SQL create table exercise. There was no RUN button just a save button.

1 Like

Yep, “save” works as well.

Happy coding!

No save did not return any query results.

1 Like

Sounds like a code error. Can you please post your code and a link to the section/exercise?

CREATE TABLE friends (
id INTEGER,
name TEXT,
birthday DATE
);

INSERT INTO friends (id, name, birthday)
VALUES (‘Jane Doe’, ‘1990-05-30’);

SELECT * FROM friends;

INSERT INTO friends (id, name, birthday)
VALUES (2, ‘BFF One’, ‘YYYY-MM-DD’);

NSERT INTO friends (id, name, birthday)
VALUES (3, ‘BFF Two’, ‘YYYY-MM-DD’);

UPDATE friends
SET name= ‘Jane Smith’
WHERE id = 1;

ALTER TABLE friends
ADD COLUMN email TEXT;

UPDATE friends
SET email = ‘jane@codeacademy.com’
WHERE id = 1;

UPDATE friends
SET email = ‘BFFOne@codeacademy.com’
WHERE id = 2;

UPDATE friends
SET email = ‘jBFFtwo@codeacademy.com’
WHERE id = 3;

DELETE FROM friends
WHERE name = ‘Jane Smith’;

SELECT *
FROM friends;
https://www.codecademy.com/paths/data-science/tracks/dspath-why-data-python-basics/modules/dspath-introduction-to-sql/projects/learn_sql_create_table

Does any of the code run?

Have you tried commenting out everything below your first few lines when you create the table?

Thank you. There are about 6 examples. I did them one by one. And there was no RUN button. Only a as save button which did not produce a query even after the first query was written.
In other words I created the table and pressed save. Nothing ran. I’m assuming it is an error in code academy??

No, there’s an error in your code.

double check the dates in step 4.

When debugging code, sometimes it’s helpful to read from the bottom up. just gives you a different perspective…

1 Like

Thank you so much! I commented out the code below the first Create Table and it worked? Phew. Thank you again!!!

2 Likes

also double check the spelling of some of the commands.

Cool.
Do that for each query (after the SELECT *...

when something doesn’t return, you can investigate from there.

Thank you!! Doing that now!

1 Like

How do you do an undo?

when writing lengthy queries it’s good to do a SELECT * FROM tablename from time to time
to see if your code is working.

undo what? typing or a query?

typing: command z (on a mac).

I’m assuming that ctrl z works on windows(?)

thank you very much. That’s it until the next time. Thank you for all of your help. Have a good evening, if you are on the east coast.

You’re welcome!
:partying_face: