title: Passing values to the insert query with select query
body: <p>I want to insert two values in the a table.One of which is actually taken from another table with the select statement as below.</p>
  
  <pre><code>query = "INSERT INTO empallowance(emp_id_fk,allowance_id_fk) VALUES(SELECT emp_id FROM employee WHERE emp_cnic='" + cnic + "',@allowance_id_fk)";
  </code></pre>
  
  <p>There is syntax error exception as shown in the figure.</p>
  
  <p><a href="https://i.stack.imgur.com/h0fZj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h0fZj.png" alt="enter image description here"></a></p>