1
  1. I have created a index on my table this way

    CREATE UNIQUE INDEX  viid_in_item_topping  ON item_topping (item_id)
    
  2. I am checking indexes on that table this way

    SHOW INDEXES FROM item_topping;
    

It displayed output as

viid_in_item_topping

How can i see this particualr index ??

(Means on what field i created index)

I have tried using show viid_in_item_topping , desc viid_in_item_topping but nothing worked .

Could you please let me know how to see the index by its name ??

This question is not the same as posted in the link , how can i see the index by its name

Pawan
  • 31,545
  • 102
  • 256
  • 434

1 Answers1

1

You can do this by either SHOW CREATE TABLE or looking in INFORMATION_SCEHMA:

SHOW CREATE TABLE item_topping;

or

SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME='item_topping'

The former is usually easier to read.

winmutt
  • 405
  • 2
  • 7