inserting array of values into table into a single column #720
Answered
by
porsager
Pavan-Rajesh
asked this question in
Q&A
-
after creating raw table with this query - ```
const myarray = ["(408)-589-5846", "(408)-589-5555"]; const x = await sql
|
Beta Was this translation helpful? Give feedback.
Answered by
porsager
Nov 5, 2023
Replies: 1 comment
-
You're overcomplicating things 😉 Just do: await sql`insert into contacts (name, phones) values ('John Doe', ${ myarray }) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Pavan-Rajesh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're overcomplicating things 😉
Just do: