Re: accessing enum
Jon Drukman <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
Christopher G. Stach II wrote:
> Jon Drukman wrote:
>> disclaimer: i know nothing about java or jdbc. a co-worker is trying
>> to access a database i've set up using jdbc. he says that my enum
>> column is always returning an integer value instead of the string.
>> obviously this is less than desirable.
>
> What's the column definition? How are you storing it? etc. etc.
CREATE TABLE `file_sha1` (
`id` int(10) unsigned NOT NULL default '0',
`type` enum('dl','wm','qt','psp','hd','mp4') NOT NULL default 'dl',
`sha1` char(40) NOT NULL default '',
`path` char(100) NOT NULL default '',
`size` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
mysql> select distinct(type) from file_sha1;
+------+
| type |
+------+
| dl |
| wm |
| qt |
| psp |
| hd |
+------+
5 rows in set (0.21 sec)
What else can I tell you?
-jsd-
--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/[email protected]