![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MYSQL
HananYu_Liu
幼儿级架构师
展开
-
【MYSQL】触发器触发另一个表事件
遇到问题:A表插入数据使B表某个字段+1,按照MYSQL触发器编写SQL脚本CREATE TRIGGER message_num BEFORE INSERT ON wx_push_message_temp FOR EACH ROWUPDATE wx_messageSET num = num + 1 WHERE in_message = message猜想:1、当B表不存在响应...原创 2019-01-08 10:24:36 · 1170 阅读 · 0 评论 -
【MySQL】通过MySQL自带函数concat_ws组合字段获取数据
<select id="getDeptUrl" parameterType="java.lang.String" resultType="com.tianheng.datacenter.system.model.dto.EmployeeDto"> select e.header_url as url, concat_ws('-',d.name,e.name) as dep...原创 2019-01-16 10:01:12 · 317 阅读 · 0 评论