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: ReplyQuote


Subject
Views
Written By
Posted
3373
March 21, 2006 11:51AM
2106
March 21, 2006 11:56AM
2495
March 21, 2006 12:29PM
Re: Problems with ALTER TABLE
2122
March 21, 2006 12:55PM
2070
March 21, 2006 01:07PM
1985
March 21, 2006 01:15PM
1983
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.