我试图做一个简单的插入到一个Postgres的表,但我得到我想要插入值被视为列名不能得到简单的PostgreSQL的插入工作
INSERT INTO "imageTagBusinessMainCategory"
(id, businessMainCategory)
VALUES
(DEFAULT, "auto dealer")
错误
其中id设置为主键,并且自动递增,而不是null。这些是我在phpPgAdmin中设置表格时勾选的框。
我虽然收到此错误:
ERROR: ERROR: column "auto dealer" does not exist
Query = INSERT
INTO "imageTagBusinessMainCategory"
(id, businessMainCategory)
VALUES
(DEFAULT,
"auto dealer")
我已经把我的表名在双引号,因为我读过here我应该。
并使用DEFAULT
自动递增的ID,因为我读过here我应该。
任何想法? 谢谢!
使用单引号。 – muratgu
单引号。离开身份证。 –
@muratgu给出了错误:'错误:错误:语法错误在''imageTagBusinessMainCategory'' 位置:13' – 1252748