Mario database syntax error with suggested command

A bit through the Mario database and postgres became unresponsive. Resetting, refreshing, etc. didn’t seem to fix the problem.

Eventually a reset and reconnect did work, and my columns are still there, but my previously inserted rows are not.

Now when I try to complete this step I get a syntax error, even when using the suggested command:

mario_database-> INSERT INTO characters(name, homeland, favorite_color) VALUES('Luigi', 'Mushroom Kingdom', 'Green');
ERROR:  syntax error at or near "INTO"
LINE 2: INSERT INTO characters

Were you able to get passed this @nfcarbone?

Your prompt shows mario_database->, that means you are in the middle of a command. You need to finish it so you can start a new one. The prompt would show mario_database=> if you were not in the middle of a command. For some more info, you are allowed to enter commands on multiple lines - so if you had a long command, you could enter part of it and press enter, and continue the command on the next line. When you do that, the prompt changes to what you see or something other than mario_database=>. You should just be able to enter ; to finish the old command and start another.

2 Likes

yes! From an old SELECT statement that never completed… thank you!

1 Like

I have the same issue, but entering the ; doesn’t fix it. please help!! this is the second time its happened, and I have to restart the session from the beginning to get past it. There must be an easier solution.

This is the line that created the problem:
INSERT INTO characters(name, homeland, favorite_color) VALUES(‘Mario’, Mushroom Kingdom’, ‘Red’);

Thank you!

i found the answer: i needed to type '); to finish a command, then it worked. not sure what i missed, but i can move on at least.

Pressing ctrl+c will also reset the prompt I believe.

This was missing a quote Mushroom Kingdom’