Incorrect usage of UNION and ORDER BY?

后端 未结 7 2271
感动是毒
感动是毒 2020-12-25 09:11

how can i use union and order by in mysql ?

select * from _member_facebook 
inner join _member_pts 
ON _member_facebook._fb         


        
7条回答
  •  孤城傲影
    2020-12-25 09:52

    try () i think like

    (SELECT  CITY,LENGTH(CITY) FROM STATION WHERE LENGTH(CITY)=(SELECT MIN(LENGTH(CITY)) FROM STATION) ORDER BY CITY LIMIT 1) 
    UNION ALL
    (SELECT  CITY,LENGTH(CITY) FROM STATION WHERE LENGTH(CITY)=(SELECT MAX(LENGTH(CITY)) FROM STATION) ORDER BY CITY LIMIT 1);
    

提交回复
热议问题