数据库拼接字符串
update friendscircle set reply = CONCAT(reply,"3333") where name = "22" ;
//求和如果为空,默认给0
select IFNULL(sum(amount_incurred),0) from wx_budget_inf where contact_id=#{0} and
wx_id=#{1} and budget_type=2 and state =2
//随机从mYsql查询一条数据
SELECT
pid
FROM
pid AS t1
JOIN (
SELECT
ROUND(
RAND() * (
(SELECT MAX(id) FROM pid) - (SELECT MIN(id) FROM pid)
) + (SELECT MIN(id) FROM pid)
) AS id
) AS t2
WHERE
t1.id >= t2.id
ORDER BY
t1.id
LIMIT 1;
标签:语句,MIN,pid,t1,mysql,reply,id,SELECT
From: https://blog.51cto.com/u_15964543/6149476