Running SQL script through psql gives syntax errors that don't occur in PgAdmin

前端 未结 4 1050
悲哀的现实
悲哀的现实 2020-12-02 02:24

I have the following script to create a table:

-- Create State table.
DROP TABLE IF EXISTS \"State\" CASCADE;
CREATE TABLE \"State\" (
 StateID SERIAL PRIMAR         


        
4条回答
  •  旧时难觅i
    2020-12-02 02:31

    What version(-s) do you use? IF EXISTS came with version 8.2, maybe you're connection with version 8.1 or older when you use psql.

提交回复
热议问题