1.生成随机数
(SELECT floor(rand()*100000000))
2.sql查询字段值长度判断是否18位
SELECT * FROM 表名 WHERE LENGTH(字段)>=18 OR 字段为null IS NULL OR 字段为空='';
SELECT * FROM 表名 WHERE char_length(字段)>24 ;
分组查询在求和
SELECT manager_id,name,job,SUM(age)AS TOTAL
FROM `user`
GROUP BY manager_id,job WITH ROLLUP;
原创文章,作者:306829225,如若转载,请注明出处:https://blog.ytso.com/tech/database/275855.html