MySQL Forums
Forum List  »  Newbie

Re: error 1170 / BLOB column 'caption' used in key specification without a key length
Posted by: Shantanu Oak
Date: July 16, 2005 08:17AM

>> When I made the column insert like this:
>> caption(200) text NOT NULL,

It is illegal to declare the limit like this. You must use the normal syntax that you used in the first post.
i.e.
caption text NOT NULL,

What I am trying to say is that the length of the key called search can not be more than 500 (or 1000, depending upon the version).
It means you can declare the KEY called search like this...

KEY search (title, caption(50));

The total bytes will be (title) 255 + caption (50) = 305

But if I try to add one more column (having 255 bytes) I will get an error.

KEY search (title, caption(200), keywords);
255 + 50 + 255 = 560

Google link:
http://tinyurl.com/9jzfv

Options: ReplyQuote


Subject
Written By
Posted
Re: error 1170 / BLOB column 'caption' used in key specification without a key length
July 16, 2005 08:17AM


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.