title: Difference between ExecuteScalar() and ExecuteNonQuery()
body: <p>The title may look like usual. But I have worth question.</p>
  <p>I referred <a href="http://nareshkamuni.blogspot.in/2012/05/what-is-difference-between.html" rel="nofollow noreferrer">this</a> link for difference between ExecuteScalar() and ExecuteNonQuery().</p>
  <p>But in that they mentioned as, ExecuteScalar() work only with non-action queries.</p>
  <p>Is it true?</p>
  <p>Many understood <code>ExecuteScalar()</code> wrongly.</p>
  <p>Have you guys ever tried the below code?</p>
  <pre><code>SqlConnection con = new SqlConnection(&quot;Data Source=SCI-DT-13; Initial Catalog=exercise; Integrated Security=true&quot;);
  con.Open();
  SqlCommand cmd = new SqlCommand(&quot;Insert into empdetails values('&quot; + t_empid.Text + &quot;','&quot; + t_empname.Text + &quot;','&quot; + t_empdesig.Text + &quot;')&quot;, con);
  cmd.ExecuteScalar();
  </code></pre>
  <p>I am sure that this code will work fine and the row will be inserted into the table.</p>
  <p>My question is, if we can perform <code>action queries</code> in <code>ExecuteScalar()</code> then why we need <code>ExecuteNonQuery()</code>?</p>