CREATE SCHEMA schema_clause [ schema_element [ , ...n ] ]
ALTER SCHEMA newschema TRANSFER oldschema.Table
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.tables -- /FROM sys.objects
WHERE schema_id != SCHEMA_ID('dbo')
WHERE schema_id != SCHEMA_ID('dbo')
DROP SCHEMA schema
No comments:
Post a Comment