MySQL Forums
Forum List  »  Newbie

Re: retrieve enum values
Posted by: Andrew Loree
Date: January 06, 2008 12:45PM

A more concise way is to use the INFORMATION_SCHEMA to grab the COLUMN_TYPE, which you would then have to parse/split to gather values from:

SELECT COLUMN_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'YourDatabase'
AND TABLE_NAME = 'YourTable'
AND COLUMN_NAME = 'YourEnum'

COLUMN_TYPE
-----------------
enum('A','B','C','D')

Options: ReplyQuote


Subject
Written By
Posted
January 04, 2008 02:49AM
January 04, 2008 04:53AM
January 04, 2008 06:27AM
January 04, 2008 06:48PM
Re: retrieve enum values
January 06, 2008 12:45PM
January 07, 2008 12:47AM


Sorry, you can't reply to this topic. It has been closed.

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.