1
drop table if exists t1;
2
create table t1 (a int check (a>0));
3
insert into t1 values (1);
4
insert into t1 values (0);
6
create table t1 (a int ,b int, check a>b);
7
insert into t1 values (1,0);
8
insert into t1 values (0,1);
10
create table t1 (a int ,b int, constraint abc check (a>b));
11
insert into t1 values (1,0);
12
insert into t1 values (0,1);
14
create table t1 (a int null);
15
insert into t1 values (1),(NULL);
17
create table t1 (a int null);
18
alter table t1 add constraint constraint_1 unique (a);
19
alter table t1 add constraint unique key_1(a);
20
alter table t1 add constraint constraint_2 unique key_2(a);
23
t1 CREATE TABLE "t1" (
25
UNIQUE KEY "constraint_1" ("a"),
26
UNIQUE KEY "key_1" ("a"),
27
UNIQUE KEY "key_2" ("a")
28
) ENGINE=MyISAM DEFAULT CHARSET=latin1