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
Your Code is:
FROM
dbo.Employees
TO
exe.Employees
I tried with this query.
ALTER SCHEMA exe TRANSFER dbo.Employees
Just write create schema exe
and execute it
In case, someone looking for lower version -
For SQL Server 2000:
sp_changeobjectowner @objname = 'dbo.Employess' , @newowner ='exe'
Through SSMS, I created a new schema by:
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
CREATE SCHEMA exe AUTHORIZATION [dbo]
GO
ALTER SCHEMA exe
TRANSFER dbo.Employees
GO