I was moving a few tables around in SQL server 2008 today (hence my earlier post about wanting to list everything), and wanted to organise things a little better, so I decided to move some of my tables to different schemas.
Here’s how I did it:-
ALTER SCHEMA newSchema TRANSFER dbo.theTable
This would transfer dbo.theTable to newSchema.theTable. Another handy little trick. Make sure the schema you are moving your table to (in my example ‘newSchema’) exists first though, or you’ll get errors.