> I create a table using the follow statement:
>
> CREATE TABLE test_check(NO_W_ID int ,NO_D_ID int,MM int,CT int,CHECK(MM
> 3));
>
> But server allow a insert statement as follow,why?
>
> insert into test_check values(1,1,1,1);
Because MySQL does not support CHECK constraints.
Yes, it parses them, but no constraints are created.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com