PostgreSQL column 'foo' does not exist

前端 未结 10 2135
盖世英雄少女心
盖世英雄少女心 2020-12-05 12:32

I have a table that has 20 integer columns and 1 text column named \'foo\'

If I run query:

SELECT * from table_name where foo is NULL
10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 13:35

    I fixed it by changing the quotation mark (") with apostrophe (') inside Values. For instance:

    insert into trucks ("id","datetime") VALUES (862,"10-09-2002 09:15:59");

    Becomes this:

    insert into trucks ("id","datetime") VALUES (862,'10-09-2002 09:15:59');

    Assuming datetime column is VarChar.

提交回复
热议问题