![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
please stay cool
这个作者很懒,什么都没留下…
展开
-
sql从数据库查询的自定义类型日期字段为null
DATE_FORMAT(c.operate_time,'%Y-%m-%d') as date需要将字段取别名原创 2020-08-15 15:11:50 · 743 阅读 · 0 评论 -
查询数据库成功,赋值元素为null
resultmap加了association后所有字段都必须在result里赋值,否则为null原创 2020-08-03 15:26:03 · 264 阅读 · 0 评论 -
sql语句出错
from 前面不能有逗号原创 2020-08-03 10:53:17 · 159 阅读 · 0 评论 -
sql多条件查询结果错误
包含or语句的需要加在最后原创 2020-08-01 14:01:32 · 289 阅读 · 0 评论 -
数据库查询有值,对象没值
数据库字段未对应实体类相应字段,导致无法赋值,应添加basemap原创 2020-07-29 15:42:16 · 489 阅读 · 0 评论 -
更新和插入后查询不到全部数据
join on 的关联数据消失时,将会查询不到数据,需要更新时把关联数据一起更新原创 2020-07-28 16:23:05 · 222 阅读 · 0 评论 -
from((orderbillitem i inner join product p on i.product_id=p.id)
查询的最后一个字段后面不能加逗号,否则会报错原创 2020-07-26 15:09:38 · 93 阅读 · 0 评论 -
sql多字段模糊查询
根据name和email查内容<if test="selectMsg!=null and selectMsg!=''"> e.name like concat('%',#{selectMsg},'%') or e.email like concat('%',#{selectMsg},'%') </if>原创 2020-07-13 12:55:46 · 556 阅读 · 0 评论