MD3.Indexes.sql 742 Bytes
Newer Older
dwentzel's avatar
dwentzel committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
IF NOT EXISTS (SELECT 1 FROM sys.objects
					 WHERE type ='u' AND object_id = OBJECT_ID('MD3.Indexes'))
BEGIN
	
	CREATE TABLE MD3.Indexes
	   (Id              BIGINT IDENTITY(1,1) NOT NULL,
			IndexName			SYSNAME NOT NULL,   
			SchemaName			SYSNAME NOT NULL, 
			TableName			SYSNAME NOT NULL,
			KeyColumns			VARCHAR(MAX)NOT NULL,
			IncludedColumns		VARCHAR(MAX) NULL,
			IsClustered			BIT NOT NULL,
			IsUnique			BIT NOT NULL,
			FGorPartitionScheme	VARCHAR(MAX)NOT NULL,
			IdxFillFactor		INT NOT NULL,
			IsPadded			BIT NOT NULL,
			CompressionSetting	VARCHAR(256) NOT NULL,
			DropIndex			BIT NOT NULL

	);
	   
	ALTER TABLE MD3.Indexes ADD CONSTRAINT IndexesPK 
	PRIMARY KEY CLUSTERED (Id);
		
END 
--drop table MD3.Indexes