Create table project.NO RESULT avaliable


#1

Hello, I am wondering why i can't see the result of my coding? i thought i after completing the exercise i might get some result but nothing.
Is there something wrong with CREATE A TABLE project?

Thank you,


#2

i feel like i am having the same problem.

the instructions seem unclear, and the button at the bottom of the coding page says 'save' instead of 'run' so its even more confusing.

am I supposed to write the code for each step, and hit run at the end (doenst make sense since the final step is deleting the changes ive made)
or hit save after every task (which doesnt work, nothing I do updated the query results!)


#3

i got it working and completed the example.

it seems you can write each task, hit save, then update the code inline, hit save again, and have everything work correctly.
it was completely bad code on my part that make it look like it wasnt working (extra comma here, missing quote there) so go thru it with a fine tooth comb.

good luck


#4

If you still can't get it working, post a screenshot so we can see what you see.


#5

Thank you but its still doesn't seem to be working for me. i double checked my code and it seems ok.


#6

unfortunately the problem still persist.

CREATE TABLE friends (id INTEGER, name TEXT, birthday DATE);
INSERT INTO friends (id, name, birthday) VALUES (1 ,"Jane Doe", 1993-05-19);
INSERT INTO friends(id, name, birthday) VALUES (2, "Marcelo", 06-20-1990);
INSERT INTO friends(id, name, birthday) VALUES (3,"Mbo", 02-15-1989);
INSERT INTO friends(id, name, birthday) VALUES (4,"Maps", 03-10-1990);
UPDATE friends
SET name = "Jane Smith"
WHERE id = 1;

ALTER TABLE friends ADD COLUMN email TEXT;

UPDATE friends
SET email = "jdoe@example.com"
WHERE id = 1;

UPDATE friends
SET email = "Marcelo@example.com"
WHERE id = 2;

UPDATE friends
SET email = "mbo@example.com"
WHERE id = 3;

UPDATE friends
SET email = "maps@example.com"
WHERE id = 4;

DELETE FROM friends WHERE id = 1;


#8

Your dates should have quotes on them.


#9

i fix this part and if you looked at database schema you could see that information is being stored. however, probably i was confused by this. maybe i am not suppose to view the query result. At the end of my coding i inputed "SELECT * FROM friends and i was able to retrieve the sorted information.


#10

To troubleshoot SQL, I would not put all of that code in and then hope it works. I would add one line at a time like this:

CREATE TABLE friends (id INTEGER, name TEXT, birthday DATE);
INSERT INTO friends (id, name, birthday) VALUES (1 ,"Jane Doe", '1993-05-19');
SELECT * from friends;

Then when I have that INSERT working, I would add one more command.


#11

oh ok i see. thank you so much! it make sense to me now.