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

Total Post:411

Points:2881
Posted on    May-06-2013 1:57 AM

 MSSQL Server MSSQL Server 
Ratings:


 1 Reply(s)
 1039  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!


AVADHESH PATEL

Total Post:604

Points:4228
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