mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
dfb60ca085
Added CEIL as an alias for CEILING Cleaned up CHECK constraint handling. (We don't anymore require braces after CHECK) Added casting to CHAR.
21 lines
532 B
Text
21 lines
532 B
Text
#
|
|
# Testing of constraints
|
|
# Currently MySQL only ignores the syntax.
|
|
#
|
|
drop table if exists t1;
|
|
|
|
create table t1 (a int check (a>0));
|
|
insert into t1 values (1);
|
|
insert into t1 values (0);
|
|
drop table t1;
|
|
create table t1 (a int ,b int, check a>b);
|
|
insert into t1 values (1,0);
|
|
insert into t1 values (0,1);
|
|
drop table t1;
|
|
create table t1 (a int ,b int, constraint abc check (a>b));
|
|
insert into t1 values (1,0);
|
|
insert into t1 values (0,1);
|
|
drop table t1;
|
|
create table t1 (a int null);
|
|
insert into t1 values (1),(NULL);
|
|
drop table t1;
|