MySQL Forums
Forum List  »  Oracle

Re: Problems with ALTER TABLE
Posted by: Bob Field
Date: March 21, 2006 12:55PM

Try something like this to constrain the sex field:

create table example
sex enum('M','W'),
n1 int(9),
);

Why 4.1 and not 5.0? In 5.0 you can write a trigger that will keep your numeric field in the appropriate range.

Options: Reply• Quote


Subject
Views
Written By
Posted
3682
March 21, 2006 11:51AM
2254
March 21, 2006 11:56AM
2632
March 21, 2006 12:29PM
Re: Problems with ALTER TABLE
2297
March 21, 2006 12:55PM
2185
March 21, 2006 01:07PM
2117
March 21, 2006 01:15PM
2099
March 21, 2006 01:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.