...

View Full Version : How we can represent ENUMs and SETs internally?



sunilmkt
01-19-2013, 03:18 PM
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...



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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum