title: Table creation in sqlite3 isn't working
body: <p>I have a problem in the creation of a one table in sqlite3. Basically, the code (language c) that I use in the creation is the following:</p>
  
  <pre><code>do{
      sprintf(buffer, "CREATE TABLE new_tab AS SELECT * FROM fileslog WHERE file_owner='%s' AND  state='%s';", file_owner, state);
  
      rc = sqlite3_prepare(db, buffer, -1, &amp;result, NULL);
  
   }while((rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED));
  </code></pre>
  
  <p>My problem is that no any table is created when I execute this code. I have printed the rc variable to see the possible errors, but its value is 0 (SQLITE_OK). I don't know that it's happening neither where is the error. </p>