-- change schema from [dbo] to [exe] IF (NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'exe')) BEGIN EXEC ('CREATE SCHEMA [exe] AUTHORIZATION [dbo]') END ALTER SCHEMA exe TRANSFER dbo.Employees