~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
create table t1 (v varchar(32) not null);
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1;
v
3r4f
abc
def
hij
alter table t1 change v v2 varchar(32);
select * from t1;
v2
3r4f
abc
def
hij
alter table t1 change v2 v varchar(64);
select * from t1;
v
3r4f
abc
def
hij
update t1 set v = 'lmn' where v = 'hij';
select * from t1;
v
3r4f
abc
def
lmn
alter table t1 add i int auto_increment not null primary key first;
select * from t1;
i	v
1	def
2	abc
3	lmn
4	3r4f
update t1 set i=5 where i=3;
select * from t1;
i	v
1	def
2	abc
4	3r4f
5	lmn
alter table t1 change i i bigint;
select * from t1;
i	v
1	def
2	abc
4	3r4f
5	lmn
alter table t1 add unique key (i, v);
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
i	v
4	3r4f
drop table t1;