title: How can I construct my sqlite query to return rows that contain data in any order?
body: <p>I would like to be able to return rows of data that contains the user's input, but in any particular order. Here is my example:</p>
  
  <p>One particular column can contain any one of multiple of the following letters:
  A B C D E F</p>
  
  <p>Such that:</p>
  
  <pre><code>letters_column
  A
  BC
  A
  FB
  AC
  ...
  </code></pre>
  
  <p>What I would like to do is if the user types in "BF", I would like to return the row that has the data 'FB'.</p>
  
  <p>I know I can make a query like this:</p>
  
  <pre><code>select * from table where letters_column like '%BF%' and where letters_column like '%FB%';
  </code></pre>
  
  <p>However, I would like to avoid making logic to create such a query as it would get hairy pretty quickly, since the user can enter more letters.</p>