title: Query to create a new table to a specific database in SQL?
body: <p>I have 3 databases <code>sytemdatabases</code>,<code>smoketest</code> and <code>learnqueries</code> .</p>
  
  <p>Every time i write and execute create table query <code>(create table tablename (colname datatype(size)))</code>, a new table is created in the <code>systemdatabases</code>.</p>
  
  <p>I need it to be created to smoketest database.
  I tried on this query <code>(create table  smoketest.newtablename(number int,name varchar(50));</code></p>
  
  <pre><code>It is showing an error (Msg 2760, Level 16, State 1, Line 1
  </code></pre>
  
  <p>The specified schema name "smoketest" either does not exist or you do not have permission to use it.) when i executed it.</p>
  
  <p>It says 2 chances </p>
  
  <ol>
  <li>Database does not exist - but the database exists</li>
  <li>Does not have permission - what does it mean -how to set permission to create a
  new table to a specific database</li>
  </ol>
  
  <p>Pls help</p>