增加数据
#insert into 表名(字段1,字段2,字段3,...) values('值1'),('值2'),('值3',...)
#字段或值之间用英文逗号隔开
#字段1,字段2,....该部分可省略,但添加的值务必与表结构数据列顺序相对应,且数量一致
#可同时插入多条数据,values后用英文逗号隔开
INSERT INTO student(StudentNo,LoginPwd,StudentName,Sex,GradeId,Phone,Address,BornDate,IdentityCard,Email)
VALUES(1001,NULL,'黄四郎',DEFAULT,4,'13855624512','鹅城',NOW(),321084199562143326,'huangsilang@126.com'),
(1002,NULL,'张麻子',2,3,'13844245123','扬州',NOW(),321084199562142226,'zhangmazi@126.com');
INSERT INTO student(StudentNo,LoginPwd,StudentName,Sex,GradeId,Phone,Address,BornDate,IdentityCard,Email)
VALUES(1003,NULL,'胡万',DEFAULT,4,'13855624512','鹅城',NOW(),321084199562143326,'huangsilang@126.com'),
(1004,NULL,'马邦德',2,3,'13844245123','扬州',NOW(),321084199562142226,'zhangmazi@126.com'),
(1005,NULL,'武举人',1,5,'13844243323','南京','1988-10-03 19:25:04',321084198905214226,'wujuren@126.com');
-----select * from 表名 :在数据库里显示表
mysql> select * from student;
+-----------+--------------------+------+------------+-------------+--------------+---------------------+---------------------+--------------------+
| studentno | studentname | sex | stugradeid | phone | address | borndate | email | identityCard |
+-----------+--------------------+------+------------+-------------+--------------+---------------------+---------------------+--------------------+
| 1001 | 姓名:黄四郎 | 1 | 4 | 13855624512 | 江苏无锡 | 2021-11-22 19:18:40 | hsl@163.com | 321084199562143326 |
| 1002 | 姓名:张麻子 | 1 | 3 | 13844245123 | 扬州 | 2021-11-22 19:18:40 | zhangmazi@126.com | 321084199562142226 |
| 1003 | 姓名:黄五郎 | 1 | 4 | 13855624512 | NULL | 2021-11-22 19:27:35 | huangsilang@126.com | 321084199562143326 |
| 1004 | 姓名:张麻汝 | 2 | 3 | 13844245123 | 扬州 | 2021-11-22 19:27:35 | zhangmazi@126.com | 321084199562142226 |
| 1005 | 姓名:武举人 | 2 | 5 | 13844243323 | 南京 | 1988-10-03 19:25:04 | wujuren@126.com | 321084198905214226 |
+-----------+--------------------+------+------------+-------------+--------------+---------------------+---------------------+--------------------+