title: Drop all objects in SQL Server database that belong to different schemas?
body: <p>Is there a way to drop all objects in a db, with the objects belonging to two different schemas?</p>
  
  <p>I had been previously working with one schema, so I query all objects using: </p>
  
  <pre><code>Select * From sysobjects Where type=...
  </code></pre>
  
  <p>then dropped everything I using </p>
  
  <pre><code>Drop Table ...
  </code></pre>
  
  <p>Now that I have introduced another schema, every time I try to drop it says something about I don't have permission or the object does not exist. BUT, if I prefix the object with the <code>[schema.object]</code> it works. I don't know how to automate this, cause I don't know what objects, or which of the two schemas the object will belong to. Anyone know how to drop all objects inside a db, regardless of which schema it belongs to?</p>
  
  <p>(The user used is owner of both schemas, the objects in the DB were created by said user, as well as the user who is removing the objects - which works if the prefix I used IE. <code>Drop Table Schema1.blah</code>)</p>