Home > DeveloperSection > Forums > In sql server 2005, how do I change the “schema” of a table without losing any data?
Pravesh Singh

Total Post:412

Posted on    May-06-2013 1:57 AM

 MSSQL Server MSSQL Server 

 1 Reply(s)
 1322  View(s)
Rate this:
Hi All!

I have a table that got into the "db_owner" schema, and I need it in the "dbo" schema.

Is there a script or command to run to switch it over?

Thanks in advance!


Total Post:604

Posted on    May-06-2013 9:01 AM

Hi Pravesh!

In SQL Server Management Studio:

Right click the table and select modify (it's called "Design" now)
On the properties panel choose the correct owning schema.

Don't want to miss updates? Please click the below button!

Follow MindStick