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
| # 创建数据库
mysql> create database redisDemo;
Query OK, 1 row affected (0.01 sec)
# 切换到数据库
mysql> use redisDemo;
Database changed
# 创建表
mysql> create table student (
-> id int not null primary key auto_increment,
-> name varchar(20),
-> age int,
-> score float
-> );
Query OK, 0 rows affected (0.02 sec)
# 插入数据
mysql> insert into student (name,age,score) values('Peter',18,100);
Query OK, 1 row affected (0.01 sec)
mysql> insert into student (name,age,score) values('Tom',17,98),('John',17,99);
Query OK, 2 rows affected (0.01 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> insert into student(name,age,score) values('farb',26,96);
Query OK, 1 row affected (0.01 sec)
|