title: How to Insert in SQL with NodeJs and mssql library with params
body: <p>I have 2 arrays, the first one contains the columns for the insert and the second one contains de values</p>
  <pre><code>const columns = ['columnName1','columnName2','columnName3','columnName4','columnName5','columnName6'];
  
  const values2 = ['test1', 'test2', 27, 1, 'an address', null];
  
  module.exports = {columns, values2}
  </code></pre>
  <p>And I'm trying to do the insert using mmsql library but not even the documentation contains a sample with multiple columns to insert values to.</p>
  <p>This is a sample of my insert</p>
  <pre><code>let pool = await sql.connect(config)
        
  
  const result = await pool.request().query(`INSERT INTO [Test].[TableName] (${testData.columns}) VALUES ?`, [[testData.values2]]);
  console.dir(result);
  
  </code></pre>
  <p>And I'm getting the following error:</p>
  <p>RequestError: Incorrect syntax near '?'.</p>
  <p>I was able to select to the db with no issues but there's something about the syntax that it doesn't seem to like..</p>