我现在又这样一个需求 有一张表 表 表名Book 字段 BookID BookName(书名) BookDesc (书的简介) 我要根据一个关键词 例如 Net入门 查询所有包含这个关键词的结果 sql 语句 select * from Book where BookName like '%Net入门%' or BookDesc like '%Net入门%' 我要对结果进行排序 把书名中包含 ‘Net入门’ 的结果 排在 书的简介中包含 ‘Net入门’ 的前面 考虑分页 SQL code: select * from Book where BookName like '%Net入门%' or BookDesc like '%Net入门%' ORDER BY CASE WHEN BookName like '%Net入门%' THEN 1 WHEN BookDesc like '%Net入门%' THEN 2 ELSE 3 END
select o_customer,o_price from orders having o_price >=avg(o_price) select o_customer,o_price from orders where o_price >=(select avg(o_price) from orders) 我感觉没有区别啊,怎么在mysql会有 ......
rs.open "select * from guide where city_name='北京' order by pai desc",conn,1,1 do while not rs.eof or rs.bof 。。 。。 。。 rs.movenext loop 这个sql语句在wap站里 本身有 ......