数据库
数据库相关
muguazhi
这个作者很懒,什么都没留下…
展开
-
mybatis-plus笔记
【代码】mybatis-plus笔记。原创 2024-03-22 11:57:54 · 93 阅读 · 0 评论 -
MySQL、Oracle笔记
MySQL、Oracle时间等相关笔记原创 2023-12-07 15:06:56 · 205 阅读 · 0 评论 -
SQL for update
forupdate可以方便手工修改数据,但是用完一定要记得关闭窗口,不然会造成锁表/行原创 2019-07-25 18:40:37 · 794 阅读 · 1 评论 -
mybatis
<![CDATA[ >= ]]> like '%' || #{name,jdbcType=VARCHAR} || '%'原创 2019-07-25 19:33:36 · 77 阅读 · 0 评论 -
Oracle 笔记
删除重复数据,只保留1一条 delete from (select * from tbl_user_authority a where (a.user_account, a.dept_code) in (select b.user_account, b.dept_code ...原创 2019-10-25 15:44:52 · 131 阅读 · 0 评论 -
SQL MINUS
MINUS 从前面的结果集中减去后面的结果集 select a.* from tab_a a where a.id in ('1','2') MINUS select a.* from tab_a a where a.id ='1' 等价于 select a.* from tab_a a where a.id ='2' select 后面必须是结果集,不能是cou...原创 2019-07-25 18:53:37 · 1168 阅读 · 0 评论 -
SQL 批量插入、批量更新
<!-- 批量插入 主键自增--> <insert id="insertBatch" parameterType="java.util.List"> insert into TAB_A (ID, CODE, NAME) select SEQ_TAB_A.Nextval, t.* from ( <for...原创 2019-07-25 19:01:30 · 1002 阅读 · 0 评论 -
自定义SQL拦截器
package com.demo.common.interceptor; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Lists; import com.goog.原创 2021-01-04 10:07:44 · 1584 阅读 · 0 评论 -
mysql 创建序列以及使用方法
DROP TABLE IF EXISTS t_sequence; -- 建t_sequence表,指定seq列为无符号大整型,可支持无符号值:0(default)到18446744073709551615(0到2^64–1)。 CREATE TABLE t_sequence ( name VARCHAR(50) NOT NULL, current_value BIGINT UNSIGNED NOT NULL DEFAULT 0, increment ..原创 2021-04-25 11:42:00 · 1420 阅读 · 0 评论