May 29, 2020 at 12:28 am
Hi, I am brand new to SQL. I'm using postgres with PopSQL interface.
I am trying to run the following basic code from a tutorial but it gives me a Failed Error:
syntax error at or near "INSERT"
Here is the code:
CREATE TABLE people (
id INT,
name VARCHAR(255),
PRIMARY KEY(id)
)
INSERT INTO people VALUES (1, 'Corey');
May 29, 2020 at 2:36 am
This is a SQL Server forum but...Add a semicolon at the end of the closing parenthesis from the create table -
CREATE TABLE people (
id INT,
name VARCHAR(255),
PRIMARY KEY(id)
);
INSERT INTO people VALUES (1, 'Corey');
Sue
May 29, 2020 at 7:41 pm
Thank-you so much! you fixed the issue!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy