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