USE pubs
GO
if exists (select * from sysobjects where name='clustered_nodupes' and type='U')
DROP TABLE clustered_nodupes
GO
CREATE TABLE clustered_nodupes (
id int NOT NULL ,
str1 char (5) NOT NULL ,
str2 char (600) NULL
)
GO
CREATE CLUSTERED INDEX idxCL ON clustered_nodupes(str1)
GO
SET NOCOUNT ON
GO
DECLARE @i int
SET @i = 1240
WHILE @i < 13000 BEGIN
INSERT INTO clustered_nodupes select @i, cast(@i AS char), cast(@i AS char)
SET @i = @i + 1
END
GO
SELECT first, root, id, indid FROM sysindexes
WHERE id = object_id('clustered_nodupes')