问题
I just started learning database a couple of days ago. I'm running into this problem where my value is being recognized as a column, and it's spitting out an error.
This is my News
table:
id | bodyText | url | createdAt | updatedAt
----+----------+-----+-----------+-----------
this is the command I ran in psql:
INSERT INTO "News" ("bodyText") VALUES ("this is a test");
and this is the error I'm getting:
ERROR: column "this is a test" does not exist
LINE 1: INSERT INTO "News" ("bodyText") VALUES ("this is a ...
I've tried removing the double quotes, adding it, doing it line by line, and so far I haven't come across an answer. Does anyone have an answer to this? Thanks in advance.
回答1:
Try this:
INSERT INTO "Notifications" ("bodyText") VALUES ('this is a test');
来源:https://stackoverflow.com/questions/44898665/psql-error-value-being-recognized-as-a-column