Home > Database > Mysql Tutorial > body text

mysql多个值排序,类似置顶

WBOY
Release: 2016-06-06 09:44:09
Original
972 people have browsed it

mysql排序

Mysql 指定多个值排序,类似置顶。请高手指教,谢谢!!

有个表mytb
id name
1 oop
2 vs
3 ui
4 lli
要实现效果:
指定2排第一,4排第二,其他的降序或者升序。
2 vs
4 lli
1 oop
3 ui
或者
2 vs
4 lli
3 ui
1 oop
请问怎样实现,谢谢!只有1币,请不要介意。。。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!