Jump to content

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!

 

 

 

 

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 '',

grace5 - your create statement appears to be missing key/index definitions....is a index on `description` really necessary?

 

consider removing the index on `description` (removing the index may have adverse effects):

 

ALTER TABLE jade_sites

    DROP INDEX description,

    MODIFY description TEXT NOT NULL;

 

  • 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.