I need a table which will allow to insert values into a column with values greater than 10. When I tried in net, they suggested to create table in following way.
CREATE TABLE test
(
UID
int(11) NOT NULL auto_increment,
ID
int(11) default NULL,
CHECK (ID > 10),
PRIMARY KEY (UID
)
);
And when I try to insert an entry with values less than 10, still values are getting inserted.
I can use Before trigger on the table to restrict insertion of values less than 10. But I wanted other approach which satisfies this condition.
I am using MySQL server 5.0.24
Please help me out of this.
According to MySQL doc: "The CHECK clause is parsed but ignored by all storage engines."