mysql中查询字段为null或者不为null:
在mysql中,查询某字段为空时,切记不可用 = null,
而是 is null,不为空则是 is not null
select * from table where column is null;
select * from table where column is not null;
参考链接:https://blog.csdn.net/qq_29663071/article/details/78979459
某一字段在插入时保留两位小数:
insert into student(name, sex, score)
values
(#{name, jdbcType=VARCHAR}, #{sex, jdbcType=VARCHAR},
(select round(#{score, jdbcType=DOUBLE}, 2)))
查询时保留两位小数
CONVERT ( max( a.value ), DECIMAL ( 10, 2 ) ) AS value,