随笔分类 -  MySql

摘要:删除重复数据,以下sql语句多次循环执行,直到没有可删除的数据,就可以达到想要的效果 DELETE FROM project_camera_lens WHERE id IN ( SELECT a.id FROM ( SELECT min( id ) id, min( lens_number ), l 阅读全文
posted @ 2022-06-12 16:02 背着泰山找黄河 阅读(76) 评论(0) 推荐(0) 编辑
摘要:Mysql查询总结:参考连接 今天 select * from 表名 where to_days(时间字段名) = to_days(now()); 昨天 SELECT * FROM 表名 WHERE TO_DAYS( NOW( ) ) - TO_DAYS( 时间字段名) = 1 近七天 SELECT 阅读全文
posted @ 2022-02-16 16:35 背着泰山找黄河 阅读(369) 评论(0) 推荐(0) 编辑
摘要:参考连接:https://www.cnblogs.com/nicole-star/p/11114199.html 一、问题 ### Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction 阅读全文
posted @ 2022-01-25 15:26 背着泰山找黄河 阅读(908) 评论(0) 推荐(0) 编辑
摘要:concat()函数 返回结果为连接参数产生的字符串 select concat('select * from ',table_name,' where sys_code = 0;') table_name from information_schema.columns where table_sc 阅读全文
posted @ 2021-11-06 14:19 背着泰山找黄河 阅读(36) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示