Sql-server – In sql server 2005, how to change the “schema” of a table without losing any data


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?

Best Solution

In SQL Server Management Studio:

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