1
by brian
clean slate |
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); |
|
5 |
drop table t1; |
|
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); |
|
9 |
drop table t1; |
|
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); |
|
13 |
drop table t1; |
|
14 |
create table t1 (a int null); |
|
15 |
insert into t1 values (1),(NULL); |
|
16 |
drop table t1; |
|
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); |
|
21 |
show create table t1; |
|
22 |
Table Create Table |
|
520.1.10
by Brian Aker
Adding back more tests. |
23 |
t1 CREATE TABLE `t1` ( |
24 |
`a` int, |
|
25 |
UNIQUE KEY `constraint_1` (`a`), |
|
26 |
UNIQUE KEY `key_1` (`a`), |
|
27 |
UNIQUE KEY `key_2` (`a`) |
|
28 |
) ENGINE=InnoDB |
|
1
by brian
clean slate |
29 |
drop table t1; |