Change Schema Name Of Table In SQL

后端 未结 10 2250
清歌不尽
清歌不尽 2020-12-04 06:15

I want to change schema name of table Employees in Database. In the current table Employees database schema name is dbo I want to chan

10条回答
  •  -上瘾入骨i
    2020-12-04 07:00

    Through SSMS, I created a new schema by:

    • Clicking the Security folder in the Object Explorer within my server,
    • right clicked Schemas
    • Selected "New Schema..."
    • Named my new schema (exe in your case)
    • Hit OK

    I found this post to change the schema, but was also getting the same permissions error when trying to change to the new schema. I have several databases listed in my SSMS, so I just tried specifying the database and it worked:

    USE (yourservername)  
    ALTER SCHEMA exe TRANSFER dbo.Employees 
    

提交回复
热议问题