今天学习的主要内容为Mysql的安装以及数据库内单表格的增删改查,然后一一练习。在最后又学到表格之间的条件查询,以图片为例
查询老师的姓名根据老师编号(?)
select tname from Teacher where cno = "";
查询教计算机导论的老师编号
select cno from Course where cname = "计算机导论";
select tname from Teacher
where cno = (select cno from Course where cname = "计算机导论");