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

前端 未结 4 1009
悲哀的现实
悲哀的现实 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条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 02:51

    Thank you guys. I have been struggling with this issue for a few weeks. I could not run my SQL scripts using PSQL. I thought I have some issues with my OS, now I know it is the BOM issue in my text file. I installed bomstrip packet in Ubuntu and now all my SQL scripts are working again.

提交回复
热议问题