title: To put output of a query executed using SQLCMD into a variable which can be used in Batch script
body: <p>I want the output of an SQL query <code>Select count(*) from Table</code> to be used as a variable in a Batch script. I am using sqlcmd to execute this query, but haven't figured out how to do this properly.</p>
  
  <p>Any help or examples would be appreciated.</p>