1
create temporary table t1 (v varchar(32) not null);
2
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
9
alter table t1 change v v2 varchar(32);
16
alter table t1 change v2 v varchar(64);
23
update t1 set v = 'lmn' where v = 'hij';
30
alter table t1 add i int auto_increment not null primary key first;
37
update t1 set i=5 where i=3;
44
alter table t1 change i i bigint;
51
alter table t1 add unique key (i, v);
52
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
56
CREATE TABLE t1 (a INTEGER AUTO_INCREMENT PRIMARY KEY, b INTEGER NOT NULL);
57
INSERT IGNORE INTO t1 (b) VALUES (5);
58
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
60
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
62
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
63
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
65
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'