使用on duplicate key update语法有时是很方便,但是会有一个影响:默认情况下,每次更新都会更新该表的自增主键ID,如果更新频率很快,会导致主键ID自增的很快,过段时间就超过数字类型的的范围了解决这个问题,有两种方式:(实际目前的方式就是把自增主键ID设置为bigint,也有一部分 ...
分类:
数据库 时间:
2019-05-24 10:52:08
阅读次数:
258
最近在从活动数据库进行异机克隆时碰到了ORA-17629,ORA-17627,ORA-12154的错误,起初以为是一个Bug呢。Oracle Bug着实太多了,已经成了习惯性思维了。汗!错误提示是无法连接到连接到远程数据库,连接字符串无法解析。咦,配置了从auxiliary DB到target DB... ...
分类:
其他好文 时间:
2019-05-21 17:19:01
阅读次数:
439
mysql 插入数据唯一键冲突 前提: 修改数据三种可用的方法解决主键冲突的问题 1. insert into ... on duplicate key update set ... 2. update ... set = case key when ... then ... when ... th ...
分类:
数据库 时间:
2019-05-20 19:36:01
阅读次数:
193
因为我在使用的是yaml文件模式,然后因为: 去掉三个相同的键以后,就能够正常运行了. ...
分类:
编程语言 时间:
2019-05-18 18:53:13
阅读次数:
351
摘要: 从5.7.6开始,增加了一种新的 tablespace模式(成为general tablespace),实际上它和共享表空间比较类似:创建一个单独的ibd,ibd中包含多个表,兼容不同的格式。general tablespace没有库的概念,因此可以在多个库里建属于同一tablespace的 ...
分类:
数据库 时间:
2019-05-14 13:24:28
阅读次数:
143
leepcode语法练习(二) 1.存在重复 给定一个整数数组,判断是否存在重复元素。 如果任何值在数组中出现至少两次,函数返回 true。如果数组中每个元素都不相同,则返回 false。 示例 1: 示例 2: 示例 3: 2.只出现一次的数字 给定一个 非空 整数数组,除了某个元素只出现一次以外 ...
分类:
其他好文 时间:
2019-05-14 09:32:43
阅读次数:
116
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa ...
分类:
其他好文 时间:
2019-05-12 12:23:03
阅读次数:
139
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the ...
分类:
其他好文 时间:
2019-05-12 11:08:59
阅读次数:
125
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr ...
分类:
其他好文 时间:
2019-05-12 10:39:59
阅读次数:
120