V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
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
insert000
V2EX  ›  MySQL

求指教一条 sql

  •  
  •   insert000 · Apr 24, 2019 · 4255 views
    This topic created in 2573 days ago, the information mentioned may be changed or developed.

    SELECT sum(a_key) as a,sum(b_key) as b ,(a+b) as c form demo;
    如上所述,正式环境有几十个字段,牵扯到各种相加排重,字段别名以后不能使用。求问有什么好的处理办法

    Raymon111111
        1
    Raymon111111  
       Apr 24, 2019
    如果可以, 全部捞出来在程序里做.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2969 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:29 · PVG 14:29 · LAX 23:29 · JFK 02:29
    ♥ Do have faith in what you're doing.