牛骨文教育服务平台(让学习变的简单)
博文笔记

[转帖]MySQL的sum函数返回的类型

创建时间:2015-05-18 投稿人: 浏览次数:202

原帖地址: http://bylijinnan.iteye.com/blog/1984472?utm_source=tuicool

摘要 : 

  1. The SUM() and AVG() functions return a DECIMAL value for exact-value arguments (integer or DECIMAL), and a DOUBLE value for approximate-value arguments (FLOAT or DOUBLE). (Before MySQL 5.0.3, SUM() and AVG() return DOUBLE for all numeric arguments.)  



原文:

今天项目切换数据库时,出错 

访问数据库的代码大概是这样: