Given an array of unique integers salary where salary[i] is the salary of the employee i. Return the average salary of employees excluding the minimum ...
分类:
其他好文 时间:
2020-06-29 09:59:02
阅读次数:
56
Mysql加锁过程详解(1)-基本知识 Mysql加锁过程详解(1)-基本知识 Mysql加锁过程详解(2)-关于mysql 幻读理解 Mysql加锁过程详解(3)-关于mysql 幻读理解 Mysql加锁过程详解(4)-select for update/lock in share mode 对事 ...
分类:
数据库 时间:
2020-06-27 21:39:45
阅读次数:
119
--删除所有约束 DECLARE c1 cursor for select'alter table ['+ object_name(parent_obj)+'] drop constraint ['+name+']; ' from sysobjects where xtype ='F' open c ...
分类:
数据库 时间:
2020-06-27 20:04:47
阅读次数:
72
数据库常用约束 1 主键约束:primary key 2 外键约束:foreign key (references) 3 唯一值约束:unique 4 默认值约束:default 5 检查约束:check 6 非空约束:not null 7 标识列:identity ...
分类:
数据库 时间:
2020-06-27 13:17:10
阅读次数:
61
Combination Sum II (M) 题目 Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidate ...
分类:
其他好文 时间:
2020-06-27 10:04:01
阅读次数:
52
521. 去除重复元素 中文English 给一个整数数组,去除重复的元素。 你应该做这些事 1.在原数组上操作2.将去除重复之后的元素放在数组的开头3.返回去除重复元素之后的元素个数 样例 例1: 输入: nums = [1,3,1,4,4,2] 输出: [1,3,4,2,?,?] 4 解释: 1 ...
分类:
其他好文 时间:
2020-06-26 23:53:37
阅读次数:
96
Given a sorted array A of unique numbers, find the K-th missing number starting from the leftmost number of the array. Example 1: Input: A = [4,7,9,10 ...
分类:
其他好文 时间:
2020-06-26 10:52:26
阅读次数:
72
Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: [1,1,2] Output: [ [1,1,2], [1,2, ...
分类:
其他好文 时间:
2020-06-25 23:47:18
阅读次数:
92
离散化 int a[N]; vector<int>tmp; for(int i=0;i<N;i++) tmp.push_back(a[i]); sort(tmp.begin(),tmp.end()); tmp.erase(unique(tmp.begin(),tmp.end()),tmp.end() ...
分类:
编程语言 时间:
2020-06-25 23:36:03
阅读次数:
71
唯一索引和主键索引区别: 1)主键为一种约束,唯一索引为一种索引,本质上就不同; 2)主键创建后一定包含唯一性索引,而唯一索引不一定就是主键; 3)主键不允许空值,唯一索引可以为空; 4)主键可以被其他表引用,而唯一索引不可以; 5)主键只允许一个,唯一索引允许多个; 6)主键和索引都是键,主键是逻 ...
分类:
其他好文 时间:
2020-06-25 21:35:12
阅读次数:
159