上面的语名是通过mysqldump -u root -p test >c:/test.sql 导出的
下面是
in 语句
select name from student where t_id in (select t.id from teacher t where t.id<2 );
exists 语句
select s.name from student s where exists (select t.id from teacher t where t.id<2 and s.t_id=t.id);
本文介绍了使用MySQL创建学生和教师两个数据表的过程,并通过SQL语句进行了数据填充。此外,还展示了如何利用IN子句和EXISTS子句进行特定条件下的数据查询。
1301

被折叠的 条评论
为什么被折叠?



