postgresql 您访问的页面不存在或已删除!

sq1bmfud  于 2023-11-18  发布在  PostgreSQL
关注(0)|答案(1)|浏览(119)

此问题在此处已有答案

Fixing column "columnname" does not exist pgsql in database. Double quote vs single quote error(1个答案)
6年前关闭.

INSERT INTO public."LeadCustomer"(
    "CustomerID", "FirstName", "Surname", "BillingAddress", "Email")
    VALUES ("12", "Lola", "Smith", "24 Cashmere Lane, Lancashire, LA4 6QT", "[email protected]");

ERROR:  column "12" does not exist
LINE 3:  VALUES ("12", "Lola", "Smith", "24 Cashmere Lane, Lancashir...
                 ^
********** Error **********

ERROR: column "12" does not exist
SQL state: 42703
Character: 111
k7fdbhmy

k7fdbhmy1#

你会得到这个错误,因为PostgreSQL使用双引号(")来表示系统标识符(如表,列等),而使用单引号(')来表示文本。
您希望查询为:

INSERT INTO public."LeadCustomer"(
    "CustomerID", "FirstName", "Surname", "BillingAddress", "Email")
    VALUES ('12', 'Lola', 'Smith', '24 Cashmere Lane, Lancashire, LA4 6QT', '[email protected]');

字符串

相关问题