PostgreSQL - 或附近的语法错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36586156/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PostgreSQL - Syntax error at or near
提问by user146303
There are a lot of questions like this, but I couldn't find one that solved my problem-
有很多这样的问题,但我找不到一个能解决我的问题的——
Can someone tell me if my syntax is wrong? I'm trying to insert data into a sql table.
有人能告诉我我的语法是否错误吗?我正在尝试将数据插入到 sql 表中。
INSERT INTO awards values ('Academy of Motion Picture Arts and Sciences','2007','Best Picture','Oscar');
I'm getting this error:
我收到此错误:
ERROR: syntax error at or near "2007"
LINE 1: ...s ('Academy of Motion Picture Arts and Sciences','2007','Bes...
回答by Anthony E
Did you paste this from somewhere? Check and replace your quote character, you're using an invalid character (e.g. '
instead of '
) for quoting.
你是从某个地方粘贴的吗?检查并替换您的引号字符,您正在使用无效字符(例如'
代替'
)进行引用。