Bug #12581 Selecting informations about *one* key

Submitted: 15 Aug 2005 12:26 Modified: 30 Jun 2009 17:09
Reporter: Pavel Ptáček Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1.12a OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[15 Aug 2005 12:26] Pavel Ptáček
Description:
I have encountered problem.. When i need to check *if* the index key *is* non_unique or to do some other checks with keys, there is *only one* MySQL statement what allows this:

SHOW INDEX FROM table

But when i want to check *known* key, theres *no* way how to do that through MySQL queries...

I have tried this:

SELECT something FROM (SHOW INDEX FROM uzivatele) AS q

but i won't work :P

Note: If i will find out, i will post here, but i think i won't :P

How to repeat:
Please repeat through email to:
pavelptacek (AT) centrum (DOT) cz
[30 Jun 2009 17:09] Valeriy Kravchuk
In MySQL 5.x this can be done with a query to INFORMATION_SCHEMA.STATISTICS table. Read http://dev.mysql.com/doc/refman/5.0/en/statistics-table.html about the details.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.