当前位置:考试网  > 试卷库  > 计算机类  > 等级考试  > 计算机二级  >  常见的几种约束有哪些?分别代表什么意思?如何使用?
试题预览

常见的几种约束有哪些?分别代表什么意思?如何使用?

更新时间:2024-05-15 07:38:58
收藏
纠错
正确答案:

主键约束,外键约束,检查约束,唯一约束,默认约束

约束:在 Create table 或 alter table 时加约束

(1) 主键: PRIMARY KEY ( 主键字段 ) 保证了实体完整性,一个表只有一个主键,但一个主键可有包含多个字段,主键字段不能为空

(2) 唯一: UNIQUE (约束字段 ) 保证了实体完整性,一个表只有多个唯一约束,一个唯一约束可有包含多个字段

(3) 外键:FOREIGN KEY (外键字段 ) REFERENCES 主键表 (主键字段 ) 保证了引用完整性,一个表可以有多个外键

(4) 检查: CHECK(检查表达式 ) 保证了域完整性, 一个表中可以有多个检查性约束

(5) 默认值: DEFAULT (默认值的表达式或 NULL) for 字段名 保证了域完整性 , 一个表可以有多个默认值约束,但是一个字段只有一个默认值

答案解析:

暂无解析

你可能感兴趣的试题

以下关于PRIMARYKEY和UNIQUE的描述中,错误的是______。

MySQL服务器使用TCP/IP网络的默认端口号是______。

下列关于事件的描述中,错误的是______。

SQL语言的数据操纵语句包括SELECT,INSERT,UPDATE和DELETE,最重要的,也是使用最频繁的语句是____。

什么是数据库的安全性?

热门试题 更多>
试题分类: 中国广告学
试题分类: 销售团队管理
试题分类: 市场营销策划
试题分类: 电子商务与现代物流
试题分类: 电子商务英语
试题分类: 消费经济学
试题分类: 国际市场营销学
试题分类: 市场调查与预测
Relaxationtherapy(=treatment).Ifyoureadthesentenceoutloud,yourbloodpressurewillgoup.Ifyoutalktoanotherperson,itwillgostillhigher.Ifthetalkiswithyourboss,yourpressurewillgoevenhigher.Ifyouspeaktosomeoneoftheoppositesex,yourpressuremayshowlesschangeifyou’remarriedthanifyou’resingle.Dozensoftimeseachday,yourbloodpressurechangeswithwhatyou’refeelinganddoing.These“upsanddowns”takeplaceineveryone,buttheyaremoresevereinpeoplewithhighbloodpressure.Thatdiscoveryisthebasisforthenewesttherapy:controllingbloodpressurebylearningskillstocontroleverydaystress.Manypatientscontroltheirbloodpressurewiththerelaxationresponse.Thistakesfoursimplethings:aquietenvironment,acomfortableposition(sittingorlyingdown),therepeatingofaword,prayerorphraseeachtimeyoubreatheandhavingnoneofotherthoughts.Somethingremarkablehappenswhenyoudothis,accordingtoresearchinBoston.Relaxationofthemindandbodyhastheeffectthatsomeblood-pressurepillswouldhave.What’smore,thebloodpressurestayslower,justasitwouldwithapill,afteryouhavestoppedtherelaxationandhavereturnedtothestressofdailylife. 31.Thefirstparagraphtellsusthereasonwhyyourbloodpressuregoesupisthat__________. A.youreadaloudasentence B.themanyoutalktoisyourboss C.you’renotmarried D.you’renervous 32.Whichofthefollowingstatementsisnottrue? A.One’sbloodpressurechangesmanytimeseveryday. B.Yourbloodpressurechangeswithyourfeelings. C.Whenyou’redoingdifferentthings,yourbloodpressure,perhaps,isdifferent. D.Thechangesofbloodpressureonlyhappentopeoplewithhighbloodpressure. 33.Thelastparagraphtellsusrelaxationtherapy__________. A.needsanewkindofmedicine B.hasthesameeffectasblood-pressurepills C.ismorethanblood-pressurepills D.isworkingandcanbeimproved
试题分类: 电子商务英语
试题分类: 电子商务网站设计原理