约束 作用:是为了保证数据的完整性而实现的摘自一套机制,它具体的根据各个不同的数据库的实现而有不同的工具(约束); 非空约束:not null; 唯一约束:unique; 主键约束:primary key; 主键约束 = not null + unique 外键约束 自增约束:auto_increm ...
分类:
其他好文 时间:
2020-01-29 17:51:52
阅读次数:
78
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; const int N=510,M=10010; int ...
分类:
其他好文 时间:
2020-01-29 16:24:35
阅读次数:
79
题目 Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a nu ...
分类:
其他好文 时间:
2020-01-28 19:02:09
阅读次数:
70
C++ 11提供的智能指针有:shared_ptr、unique_ptr、weak_ptr。在 头文件 memory 中。 一、new delete 直接管理内存 1、初始化 string * ps = new string // 初始换为一个空string int * pi = new int ; ...
分类:
编程语言 时间:
2020-01-28 10:49:44
阅读次数:
99
摘自:https://www.cnblogs.com/zhuifeng-mayi/p/9270592.html 1、普通索引 这是最基本的索引,它没有任何限制,比如上文中为title字段创建的索引就是一个普通索引,MyIASM中默认的BTREE类型的索引,也是我们大多数情况下用到的索引。 -–直接创 ...
分类:
数据库 时间:
2020-01-28 09:16:57
阅读次数:
77
在使用golang go sql driver操作mysql时,往tag表插入一条新数据时,如果插入失败,id仍会自增,插入数据失败次数过多时,id就看起来十分混乱。 所以我就在搜索下原因,发现是InnoDB的机制,大致就是说InnoDB的innodb_autoinc_lock_mode模式下,自增 ...
分类:
数据库 时间:
2020-01-27 15:47:20
阅读次数:
209
Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a numbe ...
分类:
其他好文 时间:
2020-01-27 15:17:12
阅读次数:
55
Every email consists of a local name and a domain name, separated by the @ sign. For example, in , is the local name, and is the domain name. Besides ...
分类:
其他好文 时间:
2020-01-27 09:33:24
阅读次数:
73
F. Three Paths on a Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a ...
分类:
其他好文 时间:
2020-01-26 22:34:35
阅读次数:
79
Description 描述 给一棵 $n$ 个点的树,找到三个点,使得两两之间,共三条路径,所经过的边的并集尽可能大。 输入 第一行为一个正整数 $n$($3 \le n \le 2 \times 10^5$)。 接下来 $n -1 $ 行,每行两个数 $u,v$ 表示一条边($1 \le u, ...
分类:
其他好文 时间:
2020-01-26 22:09:26
阅读次数:
120