❤️连续面试失败后,我总结了57道面试真题❤️,如果时光可以倒流 (附答案,建议收藏)_GooReey的博客-CSDN博客
csdn.net - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from csdn.net Daily Mail and Mail on Sunday newspapers.
10万字208道Java经典面试题总结(附答案,建议收藏)_GooReey的博客-CSDN博客
csdn.net - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from csdn.net Daily Mail and Mail on Sunday newspapers.
1、建表语句
CREATE TABLE `student` ( `id` int(10) NOT NULL, `name` varchar(20) NOT NULL, `age` int(10) NOT NULL, `sex` int(11) DEFAULT NULL, `address` varchar(100) DEFAULT NULL, `phone` varchar(100) DEFAULT NULL, `create time` timestamp NULL DEFAULT NULL, `update time` timestamp NULL DEFAULT NULL, `deleted` int(11) DEFAULT NULL, `teacher id` int(11) DEFAULT NULL, PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `teacher` ( `id` int(11) DEFAULT NULL, `name` varchar(100) DEFAULT NULL, `course` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2、左连接查询
explain select s.name,t.name from student s left join teacher t on s.teacher id = t.id where t.course = 数学