数据库中现有一张成绩表,为了限制成绩的输入范围,应该使用()约束。 (1.0分) [单选.] A. foreign key B. unique C. check D. primary key

数据库中现有一张成绩表,为了限制成绩的输入范围,应该使用()约束。 (1.0分) [单选.] A. foreign key B. unique C. check D. primary key

相关考题:

在SQL中,primary key为 约束的关键字,foreign key为 __________约束的关键字。

用SQL语句创建表,使用语句 CREATE TABLE 。对列的约束主要有NOT NULL ,UNIQUE,PRIMARY KEY ,FOREIGN KEY 等。定义表的删除与更新操作的完整性约束,主要有四种模式:NO ACTION ,CASCADE ,SET NULL ,SET DEFAULT 。检查列的取值范围可以用 CHECK 约束。设定列的默认取值,可以用DEFAULT 短语。 ()

下列关于完整性约束的叙述中,正确的是()A. 一个表可以有多个PRIMARY KEY约束B. 在任何情况下PRIMARY KEY约束都可以被删除C. 一个表可以有多个UNIQUE约束D. 使用NULL/NOT NULL可以设定某列的值允许为空值或不允许为空值

SQL语言中实现候选码约束的语句是(24)。A.用Candidate Key指定B.用Primary Key指定C.用UNIQUE NOT NULL约束指定D.用UNIQUE约束指定

Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?() A.Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.B.Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).C.Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.D.Define column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.

When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?() A.The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.B.The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.C.The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.D.The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.

_____A.PRIMARY KEY (部门号) NOT NULL UNIQUEB.PRIMARY KEY (部门名) UNIQUEC.FOREIGN KEY (负责人) REFERENCES 员工 (姓名)D.FOREIGN KEY (负责人) REFERENCES 员工 (员工号)A.B.C.D.

通常情况,SQL Server 2005主要支持PRIMARY约束、UNIQUE约束、CHECK约束、DEFAULT约束、FOREIGN约束。( )在定义列时,它可以为表中的指定列提供默认值。A.FOREIGN约束B.DEFAULT约束C.UNIQUE约束D.CHECK

某医院有科室关系 D (科室号,科室名,负责人,联系电话),其中: 科室号唯一标识关系 D 中的每一个元组。住院部设有病人关系 R(住院号,姓名,性别 ,科室号,家庭住址),其中,住院号唯一标识关系 R 中的每一个元组,性别的取值只能为M 或 F,要求科室号参照科室关系 D 中的科室号。创建 R 关系的 SQL 语句如下: CREATE TABLE R( 住院号 CHAR(8)( ), 姓名 CHAR (10) , 性别 CHAR(1)( ), 科室号 CHAR(4)( ), 家庭住址 CHAR( 3 0)) ;A. PRIMARY KEY B. REFERENCES D(科室号) C. NOT NULL D. FOREIGN KEY (59) A. IN (M,F) B. CHECK(M,F) C. LIKE(M,F) D.CHECK(性别 IN (M,F)) (60) A. PRIMARY KEY NOT NULL B. PRIMARY KEY UNIQUEC.FOREIGN KEY REFERENCES D(科室号)D.FOREIGN KEY REFERENCES D(科室名)

通常情况,SQLServer2005主要支持PRIMARY约束、UNIQUE约束、CHECK约束、DEFAULT约束、FOREIGN约束。()在定义列时,它可以为表中的指定列提供默认值。A.CHECKB.DEFAULT约束C.UNIQUE约束D.FOREIGN约束

Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()A、Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.B、Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).C、Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.D、Define column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.

通常情况,SQL Server 2005主要支持PRIMARY约束、UNIQUE约束、CHECK约束、DEFAULT约束、FOREIGN约束。()在定义列时,它可以为表中的指定列提供默认值。A、FOREIGN约束B、DEFAULT约束C、UNIQUE约束D、CHECK

限制输入到列的值的范围,应使用()约束。A、CHECKB、PRIMARY KEYC、FOREIGN KEYD、UNIQUE

写出约束的中文名,PRIMARY KEY约束被称为()约束,UNIQUE约束被称为()约束,CHECK约束被称为()约束。

通过逻辑表达式判断限制插入到列中的值,这属于哪种约束()A、DEFAULT约束B、CHECK约束C、PRIMARY KEY约束D、FOREIGN KEY约束

定义数据库表中指定列上插入或更新的数值必须在另一张被参照表中的特定列上存在,这属于哪种约束()A、DEFAULT约束B、CHECK约束C、PRIMARY KEY约束D、FOREIGN KEY约束

被FOREIGN KEY参照的列在表中应该具有()A、DEFAULT约束B、CHECK约束C、PRIMARY KEY约束D、REIGN KEY约束

当向数据库表中插入数据时,如果没有明确地提供输入值时,SQL Server自动为该列输入指定值,这属于哪种约束()A、DEFAULT约束B、CHECK约束C、PRIMARY KEY约束D、FOREIGN KEY约束

SQL SERVER数据库中,UNIQUE约束与PRIMARY KEY约束之间的区别是()A、UNIQUE约束要求数据库表中至少存在一行数据,因此必须在创建数据库表之后才能创建,而PRIMARY KEY约束无此限制B、UNIQUE约束允许存在空值,而PRIMARY KEY约束不允许存在空值C、创建UNIQUE约束之后,该数据行允许被更改,而PRIMARY KEY约束的数据行,不允许更改D、UNIQUE约束列不能创建外键,而PRIMAR YKEY约束列可以创建外键引用

Which two statements are true about the primary key constraint in a table? ()A、It is not possible to disable the primary key constraint.B、It is possible to have more than one primary key constraint in a single table.C、The primary key constraint can be referred by only one foreign key constraint.D、The primary key constraint can be imposed by combining more than one column.E、The non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.

Which two statements are true about constraints? ()A、The UNIQUE constraint does not permit a null value for the column.B、A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.C、The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.D、The NOT NULL constraint ensures that null values are not permitted for the column.

单选题SQL SERVER数据库中,UNIQUE约束与PRIMARY KEY约束之间的区别是()AUNIQUE约束要求数据库表中至少存在一行数据,因此必须在创建数据库表之后才能创建,而PRIMARY KEY约束无此限制BUNIQUE约束允许存在空值,而PRIMARY KEY约束不允许存在空值C创建UNIQUE约束之后,该数据行允许被更改,而PRIMARY KEY约束的数据行,不允许更改DUNIQUE约束列不能创建外键,而PRIMAR YKEY约束列可以创建外键引用

多选题Which two statements are true about constraints? ()AThe UNIQUE constraint does not permit a null value for the column.BA UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.CThe PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.DThe NOT NULL constraint ensures that null values are not permitted for the column.

单选题When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()AThe list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.BThe list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.CThe list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.DThe list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.

多选题Which two statements are true about the primary key constraint in a table? ()AIt is not possible to disable the primary key constraint.BIt is possible to have more than one primary key constraint in a single table.CThe primary key constraint can be referred by only one foreign key constraint.DThe primary key constraint can be imposed by combining more than one column.EThe non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.

单选题Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()ADefine a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.BDefine a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).CDefine column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.DDefine column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.

单选题被FOREIGN KEY参照的列在表中应该具有()ADEFAULT约束BCHECK约束CPRIMARY KEY约束DREIGN KEY约束