Jump to content

Add a Comment to a mysql key/index


The Letter E

Recommended Posts

I have scoured the internets  for the information I seek and tried the most logical conventions I could think of to achieve the desired results, to no avail.

 

Here's the problem... I want to add a comment to my indexes for different columns.

 

so when I run the following line in mysql

show indexes from tableName;

 

I will see some data in the Comment field

 

+----------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+

| Table    | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | <----- last field in result set

+----------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+

| listings |          0 | PRIMARY  |            1 | id          | A        |          0 |    NULL | NULL  |      | BTREE      |        |

| listings |          1 | user_id  |            1 | user_id    | A        |          0 |    NULL | NULL  | YES  | BTREE      |        |

 

I have no idea how to add a comment to a key, whether it be on create index, alter table, or create table methods.

 

Any help is greatly appreciated.

 

Thanks,

 

E

Link to comment
Share on other sites

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.