表达最好的土豪的英文:关于sql调用的问题?

来源:百度文库 编辑:高校问答 时间:2024/05/08 17:16:53
select * from finance order by ontop,id desc
以前用acceess的时候,当ontop=true,哪一条记事就排到第一位呀
可用sql server的时候,ontop=true,哪一条记录就排到了最后位呀,这怎么办呀?我还是让他排第一位怎么办呀

select * from finance order by ontop desc,id desc

试一试

select * from finance order by ontop desc,id asc