In sql server 2005, how do I change the “schema” of a table without losing any data?

Total Post:412

Points:2888
 1606  View(s)
Ratings:
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!
  1. Post:604

    Points:4228
    Re: In sql server 2005, how do I change the “schema” of a table without losing any data?

    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.

Answer