select * from Tbstudent where stuClassId in(1,3,4)

--top关键字:查询前若干条记录

select top(5) * from Tbstudent where stuClassId in(1,3,4)

--查询前百分之几条记录,按百分比查询出于顶端的记录,不按四舍五入,是直接进位

select top 20 percent * from Tbstudent

select * from Tbstudent

 

 

--distinct关键字:用来去除查询结构集中的重复记录

select distinct * from Tbstudent

--distinct就是先从数据表中查询出数据,然后把结果集中完全相同的记录去除掉

 

 

--查询所有的学生籍贯地

select distinct stuAddress from Tbstudent