USE pubs
GO
if exists (select*from sysobjects where name='clustered_nodupes'and type='U')
DROPTABLE clustered_nodupes
GO
CREATETABLE clustered_nodupes (
id intNOTNULL ,
str1 char (5) NOTNULL ,
str2 char (600) NULL
)
GO
CREATE CLUSTERED INDEX idxCL ON clustered_nodupes(str1)
GO
SET NOCOUNT ON
GO
DECLARE@iintSET@i=1240
WHILE @i<13000BEGININSERTINTO clustered_nodupes select@i, cast(@iASchar), cast(@iASchar)
SET@i=@i+1END
GO
SELECTfirst, root, id, indid FROM sysindexes
WHERE id = object_id('clustered_nodupes')