CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   MySQL (http://www.codingforums.com/forumdisplay.php?f=7)
-   -   How we can represent ENUMs and SETs internally? (http://www.codingforums.com/showthread.php?t=286062)

sunilmkt 01-19-2013 03:18 PM

How we can represent ENUMs and SETs internally?
 
Currently I am facing problem with my database. want to represent ENUMs & SETs. does any one have any idea.

Old Pedant 01-20-2013 05:28 AM

Ummm...

Code:

CREATE TABLE yourtable (
    ageRange ENUM( 'infant', 'toddler', 'child', 'preteen', 'teen',
                  'young adult', 'adult', 'milddle-aged', 'senior', 'ancient', 'old-pedant' )
);

So enums are easy. But now what KIND of sets are you talking about?

MySQL has a very silly SET datatype, but I don't think it is what you are looking for. But just in case:
http://dev.mysql.com/doc/refman/5.5/en/set.html


All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.