如何在SQL Server查询中的where条件中使用循环?

时间:2013-12-06 04:42:58

标签: sql-server vb.net

select * 
from student 
where roll-no in (30 to 50)

student是表格名称,roll_nofirst_name, last_name, add是列

如何打印30到50之间的学生资料?

2 个答案:

答案 0 :(得分:0)

试试这个......

Select * from Student where roll-no between 30 and 50

答案 1 :(得分:0)

SELECT * FROM STUDENT
WHERE roll-no BETWEEN 30 AND 50