ASP问题求助: 若能正确解答,就俯手称之为高手!

来源:百度知道 编辑:UC知道 时间:2024/05/28 18:43:36
有谁知道这一题的答案:
请写出在class表中查找满足如下条件的SQL语句:
1.返回c_name,c_stu字段
2.返回记录数:前5条
3.条件:c_stu值大于30,而且c_type值为真,并c_name字段值中有"二班"两字
4.查询结果按c_stu正排续,按c_type倒排序
若能正确解答,就俯手称之为高手!

sql语句:
select top 5 c_name,c_stu where c_stu>30 and c_type=true and c_name like ‘%二班%’ order by c_stu ASC,c_type desc
asp语句:
sqlstr="select top 5 c_name,c_stu where c_stu>30 and c_type=true and c_name like ‘%"&"二班"&"%’ order by c_stu ASC,c_type desc "

select top 5 c_name,c_stu where c_stu>30 and c_type=true and c_name like %\'二班\'% order by c_stu,c_type desc\"

select top 5 c_name,c_stu where c_stu>30 and c_type=true and c_name like '*二班*' order by c_stu asc,c_type desc