表完整性约束 作用,用于保证数据的完整性和一致性 |约束条件|说明| | | | |primary key|标识该字段为该表的主键,可以唯一的标识记录,不可以为空| |foreing key|标识该字段为表的外键,实现表与表之间的关联| |not null|标识该字段不能为空| |unique ke ...
分类:
其他好文 时间:
2019-10-12 13:33:38
阅读次数:
123
(1)使用ALTER TABLE语句创建索引。语法如下:alter table table_name add index index_name (column_list) ; #普通索引alter table table_name add unique (column_list) ; #唯一索引al ...
分类:
其他好文 时间:
2019-10-12 01:50:46
阅读次数:
115
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s ...
分类:
其他好文 时间:
2019-10-11 10:31:45
阅读次数:
91
建虚点,点权看作是从虚点连向实点的边权. 对整个图和虚点跑最小生成树即可. ...
分类:
其他好文 时间:
2019-10-10 20:45:49
阅读次数:
107
PV、UV、VV、IP的区别 PV即Page View,网站浏览量 UV即Unique Visitor。独立访客数 VV即Visit View,访客的访问次数 IP即Internet Protocol,独立IP数 ...
分类:
其他好文 时间:
2019-10-10 16:04:31
阅读次数:
120
1、UUID 的概念UUID(Universally Unique Identifier):通用唯一识别码,是一种软件建构的标准。 UUID 目的是让分布式系统中的所有元素,都能有唯一的辨识信息,而不需要通过中央控制端来做辨识信息的指定。 UUID是指在一台机器上生成的数字,它保证对在同一时空中的所 ...
分类:
其他好文 时间:
2019-10-10 14:13:56
阅读次数:
526
class UserProfile(auth.AbstractBaseUser, auth.PermissionsMixin): email = models.EmailField( verbose_name='email address', max_length=255, unique=True,... ...
分类:
其他好文 时间:
2019-10-10 10:43:38
阅读次数:
87
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/first-unique-character-in-a-string/ Given a string, find the first ...
分类:
其他好文 时间:
2019-10-10 10:39:39
阅读次数:
78
-- 通过反引号``来防止名字和关键字起冲突 CREATE TABLE IF NOT EXISTS `user2`( `id` INT UNSIGNED AUTO_INCREMENT COMMENT '用户编号', `username` VARCHAR(20) NOT NULL UNIQUE COM... ...
分类:
数据库 时间:
2019-10-09 15:52:52
阅读次数:
132
蚯蚓 很奇妙的一道题. 显然的暴力: 用堆维护,好了,没了. 复杂度$\Theta((n+m)\times log_2{(n+m)})$,当然这个不紧,因为堆的大小不是每时每刻都是$n+m$的. 看起来是非常优秀的复杂度,但我们看数据范围: $n\le 10^5,m\le 7\times 10^6$ ...
分类:
其他好文 时间:
2019-10-08 21:59:05
阅读次数:
85