Merge two columns from two tables into one

后端 未结 3 1555
独厮守ぢ
独厮守ぢ 2021-01-15 21:57

I\'m trying to sort by two different columns from two different tables. This is the situtation:

I have 1 table \'shops\' with a column called \'shopy\', an INT colu

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-15 22:16

    yes try this :if you want in descending order

    SELECT  FROM tableName
    UNION ALL
    SELECT  FROM tablename
    ORDER BY  DESC
    

    :if you want in ascending order:

    SELECT  FROM tableName
    UNION ALL
    SELECT  FROM tablename
    ORDER BY 
    

提交回复
热议问题