Skip to content

Instantly share code, notes, and snippets.

@daiki44
Last active September 12, 2018 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daiki44/dc7b958477303b6067958720a4082410 to your computer and use it in GitHub Desktop.
Save daiki44/dc7b958477303b6067958720a4082410 to your computer and use it in GitHub Desktop.
【Node.js】error: INSERT has more expressions than target columns ref: https://daiki-sekiguchi.com/2018/09/12/nodejs-error-insert-has-more-expressions-than-target-columns/
let insert = await this.client.query(
'INSERT INTO table(column1, column2, column3, column4, column5) VALUES($1, $2, $3, $4, $5)',
[val1, val2, val3, val4]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment