【问题标题】:Select mathematical from mysql and order by them从mysql中选择数学并按它们排序
【发布时间】:2011-08-09 22:30:44
【问题描述】:

我试图通过选择来订购结果。那可能吗?

SELECT *,(row1/row2/row3/row4) as order111 FROM `ad` ORDER BY `order111` ASC

【问题讨论】:

    标签: mysql select sql-order-by


    【解决方案1】:

    不确定您要达到的目标,但这应该可行:

    SELECT *,(row1/row2/row3/row4) as order111 
    FROM `ad` 
    ORDER BY (row1/row2/row3/row4) ASC
    

    【讨论】:

      【解决方案2】:

      你试过了吗?

      SELECT *
           , (row1/row2/row3/row4) AS order111
      FROM ad
      ORDER BY order111 ASC
      

      在 MySQL 中是可以接受的。

      【讨论】:

        猜你喜欢
        • 2010-12-12
        • 1970-01-01
        • 1970-01-01
        • 2011-09-24
        • 2017-06-17
        • 2016-08-22
        • 2012-04-24
        • 1970-01-01
        • 2010-10-20
        相关资源
        最近更新 更多