MySQL Forums
Forum List  »  Newbie

Using varchar column as an index
Posted by: John Rocha
Date: January 24, 2014 06:06PM

Hello,

I have a table that uses a varchar(1024) as an index.

I've been reading http://dev.mysql.com/doc/refman/5.0/en/create-index.html where it indicates that varchars can have indexes that can be up to 787 characters, but it appears that in the examples they always specify the size.

For example
CREATE INDEX part_of_name ON customer (name(10));

My quesion is -- what happens if no size is specified? I'm assuming/hoping that it defaults to the maximum possible size (787), but I'd like to double check this.

Thank you,

-=John

Options: ReplyQuote


Subject
Written By
Posted
Using varchar column as an index
January 24, 2014 06:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.