i created a table
CREATE TABLE [dbo].[a_temp](
[date] [date] NULL,
[batchid] [int] NULL,
[batchid1] [int] NULL
) ON [PRIMARY]
i inserted rows into the table using get date unction as
declare @i int;
set @i=0;
while(@i<=1000)
begin
insert into a_temp(date,batchid,batchid1)
values (getdate(),@i,@i+1);
set @i =@i +1;
end
when i check the data the date column is containing the same records
as
date
2011-01-12
2011-01-12
2011-01-12
2011-01-12
2011-01-12
2011-01-12
i cannot create clustered index on the date column with this similar records in the column.
can explain?
Thank you