MySQL Forums
Forum List  »  Newbie

Is it possible to reject too low values before insert
Posted by: Marek Krokosiński
Date: January 07, 2013 04:28PM

Hello.

I 'm wondering is there a way to create table and set the column min value?
something like this:
Create table test(id int auto_increment primary key, columnOne int minValue(1000));

And when I will try to execute query:
insert into test(columnOne) values(500)

It will show me an error that value for columnOne is to low. Table will accept values 1000+ ?

I was thinking about adding a trigger to check that, but I'm not sure if this is the correct and only way?

Best Regards

Options: ReplyQuote


Subject
Written By
Posted
Is it possible to reject too low values before insert
January 07, 2013 04: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.