候选键(unique)
foreign key references 除了关联外键,还可以关联 候选键(unique)
需求
table1 中的 status int 类型 ,表示状态 ,0 未启动 ,1 已启动,2 已完成
table2 中
id int identity(1,1) primary key ,
statusType int unique not null ,
statusName nvarchar(20)
table1
create table table1
(
id int identity(1,1) primary key ,
TB1Row nvarchar(20),
T1status int foreign key references dbo.table2(TB2id2)
)
候选键(unique)的更多相关文章
- [LeetCode] Unique Substrings in Wraparound String 封装字符串中的独特子字符串
Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz" ...
- [LeetCode] Minimum Unique Word Abbreviation 最短的独一无二的单词缩写
A string such as "word" contains the following abbreviations: ["word", "1or ...
- [LeetCode] Count Numbers with Unique Digits 计算各位不相同的数字个数
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Examp ...
- [LeetCode] Unique Word Abbreviation 独特的单词缩写
An abbreviation of a word follows the form <first letter><number><last letter>. Be ...
- [LeetCode] Unique Binary Search Trees 独一无二的二叉搜索树
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For examp ...
- [LeetCode] Unique Binary Search Trees II 独一无二的二叉搜索树之二
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For e ...
- [LeetCode] Unique Paths II 不同的路径之二
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How m ...
- [LeetCode] Unique Paths 不同的路径
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The ...
- 2 Unique Binary Search Trees II_Leetcode
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For e ...
随机推荐
- Vertica: 基于DBMS架构的列存储数据仓库
介绍 Vertica(属于HP公司),是一个基于DBMS架构的数据库系统,适合读密集的分析型数据库应用,比方数据仓库,白皮书中全名称为VerticaAnalytic Database.从命名中也可以看 ...
- S2SH新手框架结构的准备工作只需要导入这些文件
实习北京最近一直在某公司.时间很冲突,总想着有事找东西坐,思想,做事先成套我吧 一套完整的东西想好主题,术去实现了,在学校尽管说是学了J2EE,可是确实没学到东西,Struts2+Hibernate不 ...
- Log4j配置文件位置+Spring数据源配置文件位置
一个.Log4j配置文件位置 1.加载自己主动 当应用程序启动,缺省情况下,这将是src文件夹搜索log4j.xml型材.如果不存在.我们将继续寻找log4j.properties文件,仅仅要找到当中 ...
- ServletContext加入和访问
(1)关于ServletContext认识: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGxnZW4xNTczODc=/font/5a6L5L2T/f ...
- ZOJ 3623 Battle Ships 简单DP
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3623 题意:给出N种可以建造的船和对方的塔生命值L,每种船给出建造时 ...
- 基于PaaS人事部门间平台多重身份的技术解决方案
1.系统状态 该系统采用一个范围的省,它包含省总部和各中心.十三市分公司.其中,各县(市)局和办事处城市管理部门:由省级总部部门管理中心,它仅包含主省党部的工作人员.另一种是不在系统中. 系统业务包含 ...
- ssh配置连接
SSH构造: 1.改动vi /etc/ssh/sshd_config,依据模板将要改动的參数凝视去掉并改动參数值: Port 22 指定SSH连接的port号,安全方面不建议使用默认22port Pr ...
- 《TCP/IP具体解释》读书笔记(18章)-TCP连接的建立与中止
TCP是一个面向连接的协议.不管哪一方向还有一方发送数据之前.都必须在两方之间建立一条连接.这样的两端间连接的建立与无连接协议UDP不同.UDP向还有一端发送数据报时,无需不论什么预告的握手. 1.建 ...
- 通过管道进行线程间通信:字节流。字符流的用法及API类似
管道流(PipedStream)可以用于不同线程间直接传送数据.一个线程发送数据到输出管道,另一个线程从输入管道中读取数据.通过使用管道,实现不同线程间的通信,而无须借助于类似临时文件之类的东西. p ...
- Ubuntu 当黑屏解决方案安装
前几天我就已经安装Red hat 企业版,只是可惜它并没有提供数据源.我能够安装自己的软件,但我不能完全靠解决,因此,我们决定改变系统,最后我选择ubuntu.随时下载系统.然后用u盘制作启动盘,全部 ...