title: How to dynamically execute sql statement
body: <p>I want to execute an sql statement dynamically based on the column passed by user through jTextField.</p>
  
  <pre><code> str=select "+jTextField.getText()+"  from table ;
  </code></pre>
  
  <p>This statement works fine of the column name does not have a space.
  Example : suppose I have two columns = Priority and Request Type.</p>
  
  <p>This above statement works perfect if I type priority but fails when I use request type </p>
  
  <p>and
  if I use the statement </p>
  
  <pre><code>   str=select ["+jTextField.getText()+"]  from table ;
  </code></pre>
  
  <p>then Request Type entry will work fine but Priority won't.</p>
  
  <p>Any idea to resolve this issue.</p>