gpt4 book ai didi

sql - 为什么 Postgres 说列不存在?

转载 作者:行者123 更新时间:2023-11-29 12:30:37 26 4
gpt4 key购买 nike

<分区>

所以我一直在处理以下 sql 脚本,我似乎无法弄清楚为什么它一直告诉我我要插入的数据在一个不存在的列中。任何对 Postgre 更有经验的人都可以帮助我吗?

DROP SCHEMA pomodoro CASCADE;
CREATE SCHEMA pomodoro;
CREATE TABLE pomodoro.users
(
uid smallint NOT NULL,
username text NOT NULL,
password text NOT NULL,
weekly_goals bytea,
CONSTRAINT users_pkey PRIMARY KEY (uid)
) WITH (OIDS=FALSE);

INSERT INTO pomodoro.users (uid, username,password)
VALUES (1,"dan","pass");

我得到的错误是:

INSERT INTO pomodoro.users (uid, username,password)
VALUES (1,"dan","pass");
psql:database-backup/start-script.sql:27: ERROR: column "dan" does not exist
LINE 2: VALUES (1,"dan","pass");

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com