2

What's the difference between the SHOW INDEX, the SHOW INDEXES and the SHOW KEYS command in MySQL? If any. I get the same results.

waanders
  • 8,907
  • 22
  • 70
  • 102

2 Answers2

3

MySQL Doc

They are synonyms.

Jacob
  • 41,721
  • 6
  • 79
  • 81
  • Yes, I read this already. But that's no explanation why there are three commands for the same query. My question is: are there really no differences? Why then three commands? – waanders Jul 21 '11 at 11:33
  • It's not 3 commands. It's the same command with 3 names. You did not ask for an explanation. You asked if they are the same. Some RDBMS call indexes keys, so to ease transition there is show keys and show index/indexes. – Jacob Jul 21 '11 at 11:35
  • Okay 3 "names". But I think it's rather confusing. And "to ease transition": but then why "INDEX" and "INDEXES"? – waanders Jul 21 '11 at 11:49
2

As per MySQL documentations it is same :-

SHOW {INDEX | INDEXES | KEYS}
    {FROM | IN} tbl_name
    [{FROM | IN} db_name]

http://dev.mysql.com/doc/refman/4.1/en/show-index.html

Jatin Dhoot
  • 4,294
  • 9
  • 39
  • 59