1、学生表DDL
CREATE TABLE `student` (
`id` INT ( 11 ) NOT NULL AUTO_INCREMENT COMMENT '学号',
`createDate` datetime DEFAULT NULL,
`userName` VARCHAR ( 20 ) DEFAULT NULL,
`pwd` VARCHAR ( 36 ) DEFAULT NULL,
`phone` VARCHAR ( 11 ) DEFAULT NULL,
`age` TINYINT ( 3 ) DEFAULT NULL,
`sex` CHAR ( 2 ) DEFAULT '男',
`introduce` VARCHAR ( 255 ) DEFAULT NULL,
PRIMARY KEY ( `id` )
) ENGINE = INNODB AUTO_INCREMENT = 17 DEFAULT CHARSET = utf8;
2、插入学生信息DML
insert into student values (0,'2024-02-25 10:10:10','赵灵儿','123','15612345678',16,'女','逍遥哥哥,你终于找到我了。');
insert into student values (0,'2024-02-25 10:10:10','王语嫣','123','15612345678',17,'女','慕容复,我和你不共戴天。');
insert into student values (0,'2024-02-25 10:10:10','龙姑娘','123','15612345678',22,'女','我想过过过过儿过的日子。');
insert into student values (0,'2024-02-25 10:10:10','杨过','123','15612345678',18,'男','一遇杨过误终身。');
insert into student values (0,'2024-02-25 10:10:10','杨逍','123','15612345678',16,'男','杨过跟程英的大儿子。');
insert into student(userName,age,introduce)values('黄衣女子',26,'杨过与龙姑娘得出大女儿。');
实际效果:![](https://i-blog.csdnimg.cn/blog_migrate/fd9b83a18b772a75bac40f7c8dc7e764.png)
3、基础查询测试DQL
![](https://i-blog.csdnimg.cn/blog_migrate/e10bb0282df40ecf429c542468024340.png)