sql where和and的区别
select * from ClassInfo as a inner join StuInfo as b on a.ClassID=b.ClassID where Sex='男';
select * from ClassInfo as a inner join StuInfo as b on a.ClassID=b.ClassID and Sex='男';
第一个是 a与b在classid上等值连接,然后再按sex='男'过滤
第二个是a与b在classid且sex='男'做连接