IN SQL SERVER 2005, HOW DO I CHANGE THE “SCHEMA” OF A TABLE WITHOUT LOSING ANY DATA?

Pravesh Singh

Total Post:412

Points:2888
Posted by  Pravesh Singh
 1336  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. AVADHESH PATEL

    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

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!