Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql server change schema of a table

-- 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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #server #change #schema #table
ADD COMMENT
Topic
Name
8+6 =