February 24, 2006 at 3:41 am
hi All
I'm getting error when I'm trying to create a nonclustered index on a column.
Index 'indPAN' was not created. This index has a key length of at least 1000 bytes. The maximum permissible key length is 900 bytes.
February 24, 2006 at 7:31 am
The error message is very clear. It's not allowed to create an index if the length of all the columns in the index exceeds 900bytes
February 24, 2006 at 8:31 am
So you want to say that if the column on which I'm creating the index has a length of char(1000) then I cannot create an index on this.
February 24, 2006 at 8:58 am
an index on a char(1000) column??? --> NO
varchar(1000)? --> YES you can with a warning....... becareful!!
it's play and learn time now.... go see what happens if you create an index on varchar(1000) column and then try to insert/update that column a length of 899, 900, 901,1000 and see what happens.
February 27, 2006 at 7:53 am
If you create index on column varchar(1000), you can never insert data to that column bigger than 900 bytes becuase this will break the index. You will get an error (insertion will fail).
February 28, 2006 at 3:04 pm
c'mon.... you destroyed his play and learn time....
March 1, 2006 at 1:30 am
HI
Well tx a lot for those responses. i created an index on a varchar(1000) column and it was created but with a warning.After this I was able to insert data till 900 but after that it gave error and could not insert the data.
Well tx a lot.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply