-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sql
More file actions
55 lines (45 loc) · 1.86 KB
/
test.sql
File metadata and controls
55 lines (45 loc) · 1.86 KB
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
SET NAMES utf8mb4;
CREATE DATABASE `test` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `test`;
-- ----------------------------
-- 1、部门表
-- ----------------------------
drop table if exists test;
create table test (
id bigint(20) not null auto_increment comment 'id',
name varchar(50) default '' comment '名字',
primary key (id)
) engine=innodb auto_increment=200 comment = '部门表';
drop table if exists user;
create table user (
id bigint(20) not null auto_increment comment 'id',
`name` varchar(50) default '' comment '名字',
primary key (id)
) engine=innodb auto_increment=200 comment = '用户表';
INSERT INTO user VALUES(1, '你好1');
INSERT INTO user VALUES(2, '你好2');
INSERT INTO user VALUES(3, '你好3');
INSERT INTO user VALUES(4, '你好4');
INSERT INTO user VALUES(5, '你好5');
CREATE DATABASE `test1` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `test1`;
-- ----------------------------
-- 1、部门表
-- ----------------------------
drop table if exists test;
create table test (
id bigint(20) not null auto_increment comment 'id',
name varchar(50) default '' comment '名字',
primary key (id)
) engine=innodb auto_increment=200 comment = '部门表';
drop table if exists user1;
create table user1 (
id bigint(20) not null auto_increment comment 'id',
`name` varchar(50) default '' comment '名字',
primary key (id)
) engine=innodb auto_increment=200 comment = '用户表';
INSERT INTO user1 VALUES(1, '你好1');
INSERT INTO user1 VALUES(2, '你好2');
INSERT INTO user1 VALUES(3, '你好3');
INSERT INTO user1 VALUES(4, '你好4');
INSERT INTO user1 VALUES(5, '你好5');