Error creating a table

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

https://www.codecademy.com/courses/learn-sql/projects/learn_sql_create_table

I have completed the code according to the instructions given by it doesn’t display the expected outcome. Any feedback you can give me would be welcome.
CREATE TABLE friends (
id INTEGER,
name TEXT,
birthday DATE
);

INSERT INTO friends (id, name, birthday)
VALUES (1, ‘Ororo Munroe’, ‘1940-05-30’);

SELECT * FROM friends;

INSERT INTO friends (id, name, birthday)
VALUES (2, ‘Inday Malyn’, ‘1975-09-01’);

INSERT INTO friends (id, name, birthday)
VALUES (3, ‘Asawa Ko’, ‘1969-06-09’);

SELECT * FROM friends;

UPDATE friends
SET name = ‘Storm’
WHERE id = 1;

ALTER TABLE friends
ADD COLUMN email TEXT;

SELECT * FROM friends;

UPDATE friends
SET email = ‘[email protected]
WHERE id = 1;
UPDATE friends
SET email + ‘[email protected]
WHERE id = 2;
UPDATE friends
SET email = ‘[email protected]
WHERE id = 3;

SELECT * FROM friends;
DELETE FROM friends
WHERE id = 1;

SELECT * FROM friends;

https://www.codecademy.com/courses/learn-sql/projects/learn_sql_create_table

// You wrote:
SET email + '[email protected]'

// It should be:
SET email = '[email protected]'

Including the link to the exercise in the body of the post is very useful. But, it shouldn’t be used as the title of the thread.

Also, the text

You must select a tag to post in this category. Please find
… helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

should be deleted before you post your thread, It just distracts from the core issue you are trying to solve.

2 Likes

It’s all good now and you wee right about the mistake in the code. The code worked successfully once the suggested changes were made


:grinning: :grinning: :grinning:

1 Like