急求asp语句

来源:百度知道 编辑:UC知道 时间:2024/05/31 04:48:21
请问要查询class表中字段C_stu值大于50或者小于20的记录,并且返回c_name 和 c_stu的字段,应该如何写SQL语句 急!!

select c_name,c_stu form tablename where
c_stu>50 or c_stu<20

sql语句在where后加C_stu>50 or C_stu<20

返回值需要编程循环实现。

在循环体内rs("字段名")即可。

select c_name,c_stu from class where C_stu>50 or C_stu<20