Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.13-enterprise-commercial-advanced MySQL Enterprise Server -
Advanced Edition (Commercial)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hbsi20123g |
| hbsicsdn2012 |
| insert |
| mysql |
| performance_schema |
| sakila |
| test |
| world |
+--------------------+
9 rows in set (0.00 sec)
mysql> use hbsi20123g;
Database changed
创建两个表
mysql> create table deparment(`主键`varchar(36),`名称` varchar(200),`父部门` var
char(36),`排序` int,`电话` varchar(200),`传真` varchar(200),`地址` varchar(200),
`备注` varchar(4000),`创建时间` datetime,`创建人` varchar(200),`编辑时间` dateti
me,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.34 sec)
mysql> create table preson(`主键` varchar(36),`用户名` varchar(200),`姓名` varch
ar(200),`密码` varchar(200),`确认密码` varchar(200),`手机号码` varchar(200),`办
公电话` varchar(200),`联系地址` varchar (200),`邮箱` varchar(200),`备注` varchar
(4000),`状态` varchar(200),`创建时间` datetime,`创建人` varchar(200),`编辑时间`
datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.41 sec)
mysql> show table;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 1
mysql> desc deparment;
+--------------+---------------+------+-----+-------------------+---------------
--------------+
| Field | Type | Null | Key | Default | Extra
|
+--------------+---------------+------+-----+-------------------+---------------
--------------+
| 主键 | varchar(36) | YES | | NULL |
|
| 名称 | varchar(200) | YES | | NULL |
|
| 父部门 | varchar(36) | YES | | NULL |
|
| 排序 | int(11) | YES | | NULL |
|
| 电话 | varchar(200) | YES | | NULL |
|
| 传真 | varchar(200) | YES | | NULL |
|
| 地址 | varchar(200) | YES | | NULL |
|
| 备注 | varchar(4000) | YES | | NULL |
|
| 创建时间 | datetime | YES | | NULL |
|
| 创建人 | varchar(200) | YES | | NULL |
|
| 编辑时间 | datetime | YES | | NULL |
|
| 编辑人 | varchar(200) | YES | | NULL |
|
| 时间戳 | timestamp | NO | | CURRENT_TIMESTAMP | on update CURR
ENT_TIMESTAMP |
+--------------+---------------+------+-----+-------------------+---------------
--------------+
13 rows in set (0.12 sec)
mysql> insert into deparment values('','','商务部','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.09 sec)
mysql> select * from deparment;
+--------+--------+-----------+--------+--------+--------+--------+--------+----
-----------------+-----------+---------------------+-----------+----------------
-----+
| 主键 | 名称 | 父部门 | 排序 | 电话 | 传真 | 地址 | 备注 | 创
建时间 | 创建人 | 编辑时间 | 编辑人 | 时间戳
|
+--------+--------+-----------+--------+--------+--------+--------+--------+----
-----------------+-----------+---------------------+-----------+----------------
-----+
| | | 商务部 | 1 | | | | | 201
3-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:0
0:00 |
+--------+--------+-----------+--------+--------+--------+--------+--------+----
-----------------+-----------+---------------------+-----------+----------------
-----+
1 row in set (0.06 sec)
mysql> insert into deparment values('','','人事行政部','1','','','','',20130904,
'',20130904,'',20130904);
Query OK, 1 row affected (0.01 sec)
mysql> insert into deparment values('','','财政部','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.00 sec)
mysql> insert into deparment values('','','教育部','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.05 sec)
mysql> insert into deparment values('','','总经办','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.00 sec)
人员表插入记录
一:创建两个表
mysql> create database guanli;
Query OK, 1 row affected (0.00 sec)
mysql> use guanli;
Database changed
mysql> create table department(`主键` varchar(36),`名称` varchar(200),`父部门`
varchar (36),`排序` int(1),`电话` varchar (200),`传真` varchar (200),`地址` varc
har (200),`备注` varchar(4000),`创建时间` datetime,`创建人` varchar(200),`编辑时
间` datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.39 sec)
mysql> create table preson(`主键` varchar(36),`用户名` varchar(200),`姓名` varch
ar(200),`密码` varchar(200),`确认密码` varchar(200),`手机号码` varchar(200),`办
公电话` varchar(200),`联系地址` varchar (200),`邮箱` varchar(200),`备注` varchar
(4000),`状态` varchar(200),`创建时间` datetime,`创建人` varchar(200),`编辑时间`
datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.41 sec)
二:向部门表中插入记录
mysql> insert into department values('','商务部','',1,'','','','',20130904,'',20
130904,'',20130904);
Query OK, 1 row affected (0.50 sec)
mysql> insert into department values('','人事行政部','',2,'','','','',20130904,'
',20130904,'',20130904);
Query OK, 1 row affected (0.34 sec)
mysql> insert into department values('','财务部','',3,'','','','',20130904,'',20
130904,'',20130904);
Query OK, 1 row affected (0.33 sec)
mysql> insert into department values('','教育事业部','',4,'','','','',20130904,'
',20130904,'',20130904);
Query OK, 1 row affected (0.13 sec)
mysql> insert into department values('','总经办','',5,'','','','',20130904,'',20
130904,'',20130904);
Query OK, 1 row affected (0.34 sec)
mysql> select * from department;
+------+------------+--------+------+------+------+------+------+---------------
------+--------+---------------------+--------+---------------------+
| 主键 | 名称 | 副部门 | 排序 | 电话 | 传真 | 地址 | 备注 | 创建时间
| 创建人 | 编辑时间 | 编辑人 | 时间戳 |
+------+------------+--------+------+------+------+------+------+---------------
------+--------+---------------------+--------+---------------------+
| | 商务部 | | 1 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 人事行政部 | | 2 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 财务部 | | 3 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 教育事业部 | | 4 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 总经办 | | 5 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
+------+------------+--------+------+------+------+------+------+---------------
------+--------+---------------------+--------+---------------------+
6 rows in set (0.00 sec)
三:向人员表中插入记录
mysql> create table preson(`主键` varchar(36),`用户名` varchar(200),`姓名` varch
ar(200),`密码` varchar(200),`确认密码` varchar(200),`手机号码` varchar(200),`办
公电话` varchar(200),`联系地址` varchar (200),`邮箱` varchar(200),`备注` varchar
(4000),`状态` varchar(200),`创建时间` datetime,`创建人` varchar(200),`编辑时间`
datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.41 sec)
四:修改表中的记录
mysql> update preson set `姓名`='涛哥' where `姓名`='凤姐';
Query OK, 1 row affected (0.11 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from preson;
+------+--------+------+------+----------+----------+----------+----------+-----
-+------+------+---------------------+--------+---------------------+--------+--
-------------------+
| 主键 | 用户名 | 姓名 | 密码 | 确认密码 | 手机号码 | 办公电话 | 联系地址 | 邮箱
| 备注 | 状态 | 创建时间 | 创建人 | 编辑时间 | 编辑人 |
时间戳 |
+------+--------+------+------+----------+----------+----------+----------+-----
-+------+------+---------------------+--------+---------------------+--------+--
-------------------+
| | | 张三 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 李四 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 王五 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 麻子 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 涛哥 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
+------+--------+------+------+----------+----------+----------+----------
、
mysql> select * from deperment;
ERROR 1146 (42S02): Table 'hbsi20123g.deperment' doesn't exist
mysql> select * from deparment;
+--------+--------+-----------------+--------+--------+--------+--------+-------
-+---------------------+-----------+---------------------+-----------+----------
-----------+
| 主键 | 名称 | 父部门 | 排序 | 电话 | 传真 | 地址 | 备注
| 创建时间 | 创建人 | 编辑时间 | 编辑人 | 时间戳
|
+--------+--------+-----------------+--------+--------+--------+--------+-------
-+---------------------+-----------+---------------------+-----------+----------
-----------+
| | | 商务部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 人事行政部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 财政部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 教育部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 总经办 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
+--------+--------+-----------------+--------+--------+--------+--------+-------
-+---------------------+-----------+---------------------+-----------+----------
-----------+
5 rows in set (0.00 sec)
查看修改表中记录结果
mysql> create database student;
Query OK, 1 row affected (0.00 sec)
mysql> use student;
Database changed
mysql> create table preson(`姓名` varchar(30),`性别` char(1),`年龄` int);
Query OK, 0 rows affected (0.14 sec)
mysql> insert into preson values('春哥','男',20);
Query OK, 1 row affected, 2 warnings (0.11 sec)
mysql> insert into preson values('LOVE','','');
Query OK, 1 row affected, 1 warning (0.13 sec)
mysql> insert into preson values('凤姐','女','30');
Query OK, 1 row affected, 2 warnings (0.59 sec)
mysql> update preson set `年龄`=60 where `姓名`='凤姐';
Query OK, 1 row affected (0.33 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from preson;
+------+------+------+
| 姓名 | 性别 | 年龄 |
+------+------+------+
| 春哥 | 男 | 20 |
| LOVE | | 0 |
| 凤姐 | 女 | 60 |
+------+------+------+
3 rows in set (0.00 sec)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.13-enterprise-commercial-advanced MySQL Enterprise Server -
Advanced Edition (Commercial)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hbsi20123g |
| hbsicsdn2012 |
| insert |
| mysql |
| performance_schema |
| sakila |
| test |
| world |
+--------------------+
9 rows in set (0.00 sec)
mysql> use hbsi20123g;
Database changed
创建两个表
mysql> create table deparment(`主键`varchar(36),`名称` varchar(200),`父部门` var
char(36),`排序` int,`电话` varchar(200),`传真` varchar(200),`地址` varchar(200),
`备注` varchar(4000),`创建时间` datetime,`创建人` varchar(200),`编辑时间` dateti
me,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.34 sec)
mysql> create table preson(`主键` varchar(36),`用户名` varchar(200),`姓名` varch
ar(200),`密码` varchar(200),`确认密码` varchar(200),`手机号码` varchar(200),`办
公电话` varchar(200),`联系地址` varchar (200),`邮箱` varchar(200),`备注` varchar
(4000),`状态` varchar(200),`创建时间` datetime,`创建人` varchar(200),`编辑时间`
datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.41 sec)
mysql> show table;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 1
mysql> desc deparment;
+--------------+---------------+------+-----+-------------------+---------------
--------------+
| Field | Type | Null | Key | Default | Extra
|
+--------------+---------------+------+-----+-------------------+---------------
--------------+
| 主键 | varchar(36) | YES | | NULL |
|
| 名称 | varchar(200) | YES | | NULL |
|
| 父部门 | varchar(36) | YES | | NULL |
|
| 排序 | int(11) | YES | | NULL |
|
| 电话 | varchar(200) | YES | | NULL |
|
| 传真 | varchar(200) | YES | | NULL |
|
| 地址 | varchar(200) | YES | | NULL |
|
| 备注 | varchar(4000) | YES | | NULL |
|
| 创建时间 | datetime | YES | | NULL |
|
| 创建人 | varchar(200) | YES | | NULL |
|
| 编辑时间 | datetime | YES | | NULL |
|
| 编辑人 | varchar(200) | YES | | NULL |
|
| 时间戳 | timestamp | NO | | CURRENT_TIMESTAMP | on update CURR
ENT_TIMESTAMP |
+--------------+---------------+------+-----+-------------------+---------------
--------------+
13 rows in set (0.12 sec)
mysql> insert into deparment values('','','商务部','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.09 sec)
mysql> select * from deparment;
+--------+--------+-----------+--------+--------+--------+--------+--------+----
-----------------+-----------+---------------------+-----------+----------------
-----+
| 主键 | 名称 | 父部门 | 排序 | 电话 | 传真 | 地址 | 备注 | 创
建时间 | 创建人 | 编辑时间 | 编辑人 | 时间戳
|
+--------+--------+-----------+--------+--------+--------+--------+--------+----
-----------------+-----------+---------------------+-----------+----------------
-----+
| | | 商务部 | 1 | | | | | 201
3-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:0
0:00 |
+--------+--------+-----------+--------+--------+--------+--------+--------+----
-----------------+-----------+---------------------+-----------+----------------
-----+
1 row in set (0.06 sec)
mysql> insert into deparment values('','','人事行政部','1','','','','',20130904,
'',20130904,'',20130904);
Query OK, 1 row affected (0.01 sec)
mysql> insert into deparment values('','','财政部','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.00 sec)
mysql> insert into deparment values('','','教育部','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.05 sec)
mysql> insert into deparment values('','','总经办','1','','','','',20130904,'',2
0130904,'',20130904);
Query OK, 1 row affected (0.00 sec)
人员表插入记录
一:创建两个表
mysql> create database guanli;
Query OK, 1 row affected (0.00 sec)
mysql> use guanli;
Database changed
mysql> create table department(`主键` varchar(36),`名称` varchar(200),`父部门`
varchar (36),`排序` int(1),`电话` varchar (200),`传真` varchar (200),`地址` varc
har (200),`备注` varchar(4000),`创建时间` datetime,`创建人` varchar(200),`编辑时
间` datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.39 sec)
mysql> create table preson(`主键` varchar(36),`用户名` varchar(200),`姓名` varch
ar(200),`密码` varchar(200),`确认密码` varchar(200),`手机号码` varchar(200),`办
公电话` varchar(200),`联系地址` varchar (200),`邮箱` varchar(200),`备注` varchar
(4000),`状态` varchar(200),`创建时间` datetime,`创建人` varchar(200),`编辑时间`
datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.41 sec)
二:向部门表中插入记录
mysql> insert into department values('','商务部','',1,'','','','',20130904,'',20
130904,'',20130904);
Query OK, 1 row affected (0.50 sec)
mysql> insert into department values('','人事行政部','',2,'','','','',20130904,'
',20130904,'',20130904);
Query OK, 1 row affected (0.34 sec)
mysql> insert into department values('','财务部','',3,'','','','',20130904,'',20
130904,'',20130904);
Query OK, 1 row affected (0.33 sec)
mysql> insert into department values('','教育事业部','',4,'','','','',20130904,'
',20130904,'',20130904);
Query OK, 1 row affected (0.13 sec)
mysql> insert into department values('','总经办','',5,'','','','',20130904,'',20
130904,'',20130904);
Query OK, 1 row affected (0.34 sec)
mysql> select * from department;
+------+------------+--------+------+------+------+------+------+---------------
------+--------+---------------------+--------+---------------------+
| 主键 | 名称 | 副部门 | 排序 | 电话 | 传真 | 地址 | 备注 | 创建时间
| 创建人 | 编辑时间 | 编辑人 | 时间戳 |
+------+------------+--------+------+------+------+------+------+---------------
------+--------+---------------------+--------+---------------------+
| | 商务部 | | 1 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 人事行政部 | | 2 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 财务部 | | 3 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 教育事业部 | | 4 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
| | 总经办 | | 5 | | | | | 2013-09-04 00:
00:00 | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 |
+------+------------+--------+------+------+------+------+------+---------------
------+--------+---------------------+--------+---------------------+
6 rows in set (0.00 sec)
三:向人员表中插入记录
mysql> create table preson(`主键` varchar(36),`用户名` varchar(200),`姓名` varch
ar(200),`密码` varchar(200),`确认密码` varchar(200),`手机号码` varchar(200),`办
公电话` varchar(200),`联系地址` varchar (200),`邮箱` varchar(200),`备注` varchar
(4000),`状态` varchar(200),`创建时间` datetime,`创建人` varchar(200),`编辑时间`
datetime,`编辑人` varchar(200),`时间戳` timestamp);
Query OK, 0 rows affected (0.41 sec)
四:修改表中的记录
mysql> update preson set `姓名`='涛哥' where `姓名`='凤姐';
Query OK, 1 row affected (0.11 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from preson;
+------+--------+------+------+----------+----------+----------+----------+-----
-+------+------+---------------------+--------+---------------------+--------+--
-------------------+
| 主键 | 用户名 | 姓名 | 密码 | 确认密码 | 手机号码 | 办公电话 | 联系地址 | 邮箱
| 备注 | 状态 | 创建时间 | 创建人 | 编辑时间 | 编辑人 |
时间戳 |
+------+--------+------+------+----------+----------+----------+----------+-----
-+------+------+---------------------+--------+---------------------+--------+--
-------------------+
| | | 张三 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 李四 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 王五 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 麻子 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
| | | 涛哥 | | | | | |
| | | 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | |
2013-09-04 00:00:00 |
+------+--------+------+------+----------+----------+----------+----------
、
mysql> select * from deperment;
ERROR 1146 (42S02): Table 'hbsi20123g.deperment' doesn't exist
mysql> select * from deparment;
+--------+--------+-----------------+--------+--------+--------+--------+-------
-+---------------------+-----------+---------------------+-----------+----------
-----------+
| 主键 | 名称 | 父部门 | 排序 | 电话 | 传真 | 地址 | 备注
| 创建时间 | 创建人 | 编辑时间 | 编辑人 | 时间戳
|
+--------+--------+-----------------+--------+--------+--------+--------+-------
-+---------------------+-----------+---------------------+-----------+----------
-----------+
| | | 商务部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 人事行政部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 财政部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 教育部 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
| | | 总经办 | 1 | | | |
| 2013-09-04 00:00:00 | | 2013-09-04 00:00:00 | | 2013-09-0
4 00:00:00 |
+--------+--------+-----------------+--------+--------+--------+--------+-------
-+---------------------+-----------+---------------------+-----------+----------
-----------+
5 rows in set (0.00 sec)
查看修改表中记录结果
mysql> create database student;
Query OK, 1 row affected (0.00 sec)
mysql> use student;
Database changed
mysql> create table preson(`姓名` varchar(30),`性别` char(1),`年龄` int);
Query OK, 0 rows affected (0.14 sec)
mysql> insert into preson values('春哥','男',20);
Query OK, 1 row affected, 2 warnings (0.11 sec)
mysql> insert into preson values('LOVE','','');
Query OK, 1 row affected, 1 warning (0.13 sec)
mysql> insert into preson values('凤姐','女','30');
Query OK, 1 row affected, 2 warnings (0.59 sec)
mysql> update preson set `年龄`=60 where `姓名`='凤姐';
Query OK, 1 row affected (0.33 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from preson;
+------+------+------+
| 姓名 | 性别 | 年龄 |
+------+------+------+
| 春哥 | 男 | 20 |
| LOVE | | 0 |
| 凤姐 | 女 | 60 |
+------+------+------+
3 rows in set (0.00 sec)