This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF NOT EXISTS(SELECT * FROM sys.schemas WHERE [name] = N'dbo') | |
EXEC (N'CREATE SCHEMA dbo') | |
GO | |
IF EXISTS (SELECT * FROM sys.objects so JOIN sys.schemas sc ON so.schema_id = sc.schema_id WHERE so.name = N'activity_data' AND sc.name=N'dbo' AND type in (N'U')) | |
BEGIN | |
DECLARE @drop_statement nvarchar(500) | |
DECLARE drop_cursor CURSOR FOR | |
SELECT 'alter table '+quotename(schema_name(ob.schema_id))+ |
NewerOlder