forked from matrixorigin/mysql-tester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsert.test
33 lines (33 loc) · 1.49 KB
/
insert.test
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
drop table if exists names;
create table names(id int PRIMARY KEY AUTO_INCREMENT,name VARCHAR(255) UNIQUE,age int);
insert into names(name, age) values("Abby", 24);
insert into names(name, age) values("Bob", 25);
insert into names(name, age) values("Carol", 23);
insert into names(name, age) values("Dora", 29);
select id,name,age from names;
drop table if exists weights;
create table weights(a int unique);
insert into weights values(1);
select * from weights;
drop table if exists test;
create table test(id int primary key, name varchar(10), age int);
insert into test values(1, 'Abby', 20);
insert into test values(2, 'Bob', 21);
select id,name,age from test;
drop table if exists pet;
create table pet(name char(10),owner char(10), species char(10), gender char(1), weight float,age int);
insert into pet values ('Sunsweet01','Dsant01','otter','f',30.11,2),
('Sunsweet02','Dsant02','otter','m',30.11,3);
insert into pet(name, owner, species, gender, weight, age) values ('Sunsweet03','Dsant01','otter','f',30.11,2),
('Sunsweet04','Dsant02','otter','m',30.11,3);
select * from pet;
drop table if exists t1;
create table t1 (a bigint unsigned not null, primary key(a));
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
select * from t1;
drop table if exists t1;
create table t1 (name char(20) not null primary key ) charset latin1;
insert into t1 values ("å");
insert into t1 values ("ä");
insert into t1 values ("ö");
select * from t1 order by name;