4

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.

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...
2
  • 2
    Wrong quote characters. Need simple apostrophe '.. Commented Apr 13, 2016 at 0:03
  • 2
    INSERT without target column list is only a good idea for special cases. Typically, it is not since it is error-prone (in addition to your syntax error with the singele-quote). Commented Apr 13, 2016 at 1:11

1 Answer 1

8

Did you paste this from somewhere? Check and replace your quote character, you're using an invalid character (e.g. instead of ') for quoting.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.