If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > ENUM in Oracle

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-04, 13:50
monty10 monty10 is offline
Registered User
 
Join Date: May 2004
Posts: 2
ENUM in Oracle

How can enumeration be achieved in Oracle eg like:-

gender enum('male','female')

in SQL.

Thanks in Advance
Reply With Quote
  #2 (permalink)  
Old 05-05-04, 14:00
Nocopy Nocopy is offline
Registered User
 
Join Date: May 2004
Location: Redwood Shores, CA
Posts: 68
decode(gender,'male','1','female,'2',null)
__________________
My way or the highway. Yeah

Last edited by Nocopy; 05-05-04 at 14:03.
Reply With Quote
  #3 (permalink)  
Old 05-06-04, 04:35
monty10 monty10 is offline
Registered User
 
Join Date: May 2004
Posts: 2
This doesn't seem to work. Although i am using objects this may be why.
Reply With Quote
  #4 (permalink)  
Old 05-06-04, 13:02
Nocopy Nocopy is offline
Registered User
 
Join Date: May 2004
Location: Redwood Shores, CA
Posts: 68
Quote:
Originally Posted by monty10
This doesn't seem to work. Although i am using objects this may be why.
How do you think objects make difference?

Post code fragment.
__________________
My way or the highway. Yeah
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On