随笔分类 - MySql
摘要:删除重复数据,以下sql语句多次循环执行,直到没有可删除的数据,就可以达到想要的效果 DELETE FROM project_camera_lens WHERE id IN ( SELECT a.id FROM ( SELECT min( id ) id, min( lens_number ), l
阅读全文
摘要:Mysql查询总结:参考连接 今天 select * from 表名 where to_days(时间字段名) = to_days(now()); 昨天 SELECT * FROM 表名 WHERE TO_DAYS( NOW( ) ) - TO_DAYS( 时间字段名) = 1 近七天 SELECT
阅读全文
摘要:参考连接:https://www.cnblogs.com/nicole-star/p/11114199.html 一、问题 ### Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
阅读全文
摘要:concat()函数 返回结果为连接参数产生的字符串 select concat('select * from ',table_name,' where sys_code = 0;') table_name from information_schema.columns where table_sc
阅读全文