![](https://img-blog.csdnimg.cn/2019092715111047.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
mysql
mysql
hikarilee
这个作者很懒,什么都没留下…
展开
-
sum函数返回值为空
sum()函数返回值为null 一、SELECT IFNULL(sum(reward_fate),0) from table where id= ‘xxxxx’; 二、SELECT COALESCE(sum(reward_fate),0) from table where id = ‘xxxxx’;原创 2022-02-11 14:00:10 · 1290 阅读 · 0 评论 -
快速导出表结构
** navact 快速导出表结构 ** SELECT COLUMN_NAME 列名, COLUMN_TYPE 数据类型, IS_NULLABLE 是否允许空值, COLUMN_COMMENT 注释, COLUMN_KEY 主键 FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA='xxx' -- TABLE_SCHEMA是数据库名 AND table_name='xxx' -- table_name是表名 转载自https:/原创 2021-12-06 10:56:24 · 315 阅读 · 0 评论 -
2020-12-21
< if test=“distinct” >distinct< /if>写法 <select id="selectxxx" parameterType="xxx" resultMap="xxx"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from xxxtable原创 2020-12-21 23:47:00 · 278 阅读 · 0 评论