Jump to content

#1170 key specification without a key length


grace5

Recommended Posts

I know very little about MySQL

 

I am trying to alter a table for descriptions from a varchar(255) to a TEXT

as I want more space for description lenght.

I have tried this:

 

 

 

SQL query:

 

ALTER TABLE jade_sites CHANGE description description TEXT NOT NULL

 

MySQL said: 

 

#1170 - BLOB/TEXT column 'description' used in key specification without a key length

 

 

 

if I try to edit thru phpMyAdmin

I get this error:

 

ALTER TABLE `jade_sites` CHANGE `description` `description` TEXT CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL

 

MySQL said: 

 

#1170 - BLOB/TEXT column 'description' used in key specification without a key length

 

 

any help would be thankfully received!

 

 

 

 

Link to comment
Share on other sites

ALTER TABLE `videos` CHANGE `artist` `artist` TEXT NOT NULL

 

That, and just that, worked perfectly for me when changing one of my tables. So try

 

ALTER TABLE `jade_sites` CHANGE `description` `description` TEXT NOT NULL

Link to comment
Share on other sites

I get the same error:

 

 

Error

SQL query:

 

ALTER TABLE `jade_sites` CHANGE `description` `description` TEXT NOT NULL

 

MySQL said: 

 

#1170 - BLOB/TEXT column 'description' used in key specification without a key length

 

Link to comment
Share on other sites

how do I do that?

(sorry I am really not trying to be humble,I really don't know much about MySQL myphpadmin)

 

could this be it?

CREATE TABLE jade_sites ( id smallint(6) NOT NULL auto_increment, title varchar(100) NOT NULL default '0', url varchar(255) NOT NULL default '', dateadd datetime NOT NULL default '0000-00-00 00:00:00', id_cat smallint(6) NOT NULL default '0', description varchar(255) NOT NULL default '',

Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.