时间:2022-12-06 01:25
mysql中设置文本排序的方法
1.首先,在命令行中启动MySQL服务;
service mysql start
2.MySQL服务启动后,在命令行中输入mysql的用户名和密码登录到MySQL;
mysql -u root -p
3.登录到MySQL后,选择使用一个数据库;
use mysql;
4.最后,进入到数据库后,在数据库中执行以下命令即可对文本进行排序;
SELECT * from intd left join(
select * from (
select * from gengxin order by time desc
)
as b group by intd_id
)as c
on intd.id = c.intd_id where c.yihou like '%%' and intd.ddleixing='' and intd.xm1='' order by (select case c.muqian when '' then 1 end) asc