본문 바로가기
프로그래밍/DBMS

MSSQL 클러스터드 인덱스 생성 스크립트

by zoo10 2018. 2. 2.

스크립트로 인덱스 생성하기




USE AdventureWorks2012; GO -- Create a new table with three columns. CREATE TABLE dbo.TestTable (TestCol1 int NOT NULL, TestCol2 nchar(10) NULL, TestCol3 nvarchar(50) NULL); GO -- Create a clustered index called IX_TestTable_TestCol1 -- on the dbo.TestTable table using the TestCol1 column. CREATE CLUSTERED INDEX IX_TestTable_TestCol1 ON dbo.TestTable (TestCol1); GO