As Bhavin stated, ENUM is one way to do this, but you can (and should) validate all data in your scripts prior to entering it in your database. (assuming that you're not just using the command-line interface and have an actual GUI)
All user-supplied information should be checked for validity - and if you need the data to conform to a specific set, then you can easily check it against an array of valid responses. Just my $.02. -Mike -----Original Message----- From: Bhavin Vyas [mailto:[EMAIL PROTECTED] Sent: Sunday, March 30, 2003 9:01 PM To: warm-fusion; [EMAIL PROTECTED] Subject: Re: Validations I don't think Validation is possible. Look up ENUM, which is very different, but just might help you a little. ----- Original Message ----- From: "warm-fusion" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 5:25 PM Subject: Validations > Hi, I'm a newbie to MySQL, and I'm wondering whether there is any way to > set validations on acceptable field values when using the 'create > table()' etc. statements? I've performed a (most cursory) search of the > documentation, but that didn't turn up anything useful. Any suggestions? > Many thanks! > > Marc > > > "On two occasions I have been asked [by members of Parliament!], 'Pray, > Mr. Babbage, if you put into the machine wrong figures, will the right > answers come out?' I am not able rightly to apprehend the kind of > confusion of ideas that could provoke such a question." > ~Charles Babbage > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]