syntax error on insert

  • CodeCaptain

    SSC Rookie

    Points: 33

    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),



    INSERT INTO people VALUES (1, 'Corey');

  • Sue_H

    SSC Guru

    Points: 90673

    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),



    INSERT INTO people VALUES (1, 'Corey');



  • CodeCaptain

    SSC Rookie

    Points: 33

    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