title: Parameterize MySQL workbench statements: How to define variables
body: <p>I'm trying to parameterize a set of frequently used queries in my workbench.</p>
  
  <p>This works:</p>
  
  <pre><code>select * from providers where id='112233';
  </code></pre>
  
  <p>This</p>
  
  <pre><code>WbVarDef var1=112233;
  
  select * from providers where id='$[var1]';
  </code></pre>
  
  <p>gives error </p>
  
  <blockquote>
    <p>Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from providers where id='112233'' at line 1</p>
  </blockquote>
  
  <p>My reference was <a href="http://www.sql-workbench.net/manual/using-variables.html" rel="noreferrer">this</a>.</p>
  
  <p>Just to be clear, these are in the MySQL workbench and not a workbench script file or a mysql script file.</p>