SQL 语句的高手进,在线等...

来源:百度知道 编辑:UC知道 时间:2024/05/22 00:20:16
请写出在class表中找出满足如下条件的记录的SQL语句
1.返回字段 c_name,c_stu
2.返回记录数: 前5条
3.查询条件:c_stu值大于 30,并且c_type值为真
并且c_name字段值中有"二班"两个字
4.查询结果按c_stu正排序,按c_type到排序
(注:在正排序时请不要省略排序关键字)
都还不对呀,我的问题是在一个Flash教程里看到的,看不到答案
只能输入答案,对的话,就可以再看的,
能帮忙的QQ:309409100
小弟先谢了

select top 5 c_name,c_stu from class 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 from class where c_stu>30 and c_type=true and instr('二班' ,c_name)<>0 order by c_stu asc,c_type desc

SQL还需要帮忙吗?!

加你Q了