5

I was wondering what the SQL Query format would be for inserting data from a CSV into MySQL would be. The template it gives is, "INSERT INTO tablename (col1, col2, col3) VALUES (?,?,?);"

Because the values are dynamic and different in each CSV file, what are they looking for to replace the question marks?

Here is a link to the general format of the template.

http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-template-copys3tords.html

Best,

kakkman

kakkman
  • 93
  • 2
  • 11

1 Answers1

1

For the this query,

You don't need to specify the question mark when you execute query.

What does a question mark represent in SQL queries?

You only need to care about columns which are named correctly.

let's say you have a table: contact(id, name, phone, address).

Then, the query should be "INSERT INTO contact(id, name, phone, address) VALUES(?,?,?,?)"

Community
  • 1
  • 1
Junren
  • 44
  • 2