随笔分类 - mysql
摘要:1、查询单条最新的记录 select * from table order by create_time limit 1; 2、查询多条的最新记录 单表查询: select type, max(create_time) from table group by type 多表查询: select t1
阅读全文
摘要:DELIMITER ;;CREATE TRIGGER 触发器名称BEFORE INSERT ON 表名 FOR EACH ROW BEGIN IF new.主键名 IS NULL THEN SET new.主键名 = REPLACE(UUID(), '-', ''); END IF;END;;DEL
阅读全文
摘要:错误信息:java.sql.SQLException: Cannot create java.lang.Integer 产生错误的原因:Integer没有无参构造方法,不能使用new BeanHandler<Integer>(Integer.class)的方法封装 解决方法:不要使用Integer接
阅读全文

浙公网安备 33010602011771号