› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
luckylion
V2EX  ›  MySQL

查询语句数字排列的问题

  •  
  •   luckylion · Aug 18, 2014 · 3731 views
    This topic created in 4422 days ago, the information mentioned may be changed or developed.
    比如说表中有数据
    101
    105
    112
    201
    202
    501

    查询后得出的结果是
    112
    105
    101

    202
    201

    501

    这样的查询怎样些
    3 replies  •  2014-08-18 13:16:08 +08:00
    mgc
        1
    mgc  
       Aug 18, 2014   ❤️ 1
    ORDER BY LEFT(col, 1) DESC, ORDER BY col DESC
    luckylion
        2
    luckylion  
    OP
       Aug 18, 2014
    多谢,解决
    sumarklee
        3
    sumarklee  
       Aug 18, 2014
    需要分开写吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2573 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 64ms · UTC 01:44 · PVG 09:44 · LAX 18:44 · JFK 21:44
    ♥ Do have faith in what you're doing.