-
Notifications
You must be signed in to change notification settings - Fork 14
/
insert.result
executable file
·57 lines (57 loc) · 1.86 KB
/
insert.result
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
56
57
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;
id name age
null Abby 24
null Bob 25
null Carol 23
null Dora 29
drop table if exists weights;
create table weights(a int unique);
insert into weights values(1);
select * from weights;
a
1
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;
id name age
1 Abby 20
2 Bob 21
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;
name owner species gender weight age
Sunsweet01 Dsant01 otter f 30.11 2
Sunsweet02 Dsant02 otter m 30.11 3
Sunsweet03 Dsant01 otter f 30.11 2
Sunsweet04 Dsant02 otter m 30.11 3
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;
a
18446744073709551615
18446744073709551614
18446744073709551613
18446744073709551612
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;
name
ä
å
ö