溫馨提示×

mysql中如何設置文本排序

九三
205
2021-01-05 14:34:08
欄目: 云計算

mysql中如何設置文本排序

mysql中設置文本排序的方法

1.首先,在命令行中啟動MySQL服務;

service mysql start  

2.MySQL服務啟動后,在命令行中輸入mysql的用戶名和密碼登錄到MySQL;

mysql -u root -p

3.登錄到MySQL后,選擇使用一個數(shù)據(jù)庫;

use mysql;

4.最后,進入到數(shù)據(jù)庫后,在數(shù)據(jù)庫中執(zhí)行以下命令即可對文本進行排序;

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

0