在数据表设计时,UNIQUE与PRIMARY KEY两者的区别是()A.UNIQUE要求数据表中至少存在一行数据,必须在建表后创建,而PRIMARY KEY无该限制B.UNIQUE允许空值存在,而PRIMARY KEY不允许C.创建UNIQUE后,该数据行允许被修改,而PRIMARY KEY则不允许D.UNIQUE列不能创建外键,而PRIMARY KEY可以创建外键

在数据表设计时,UNIQUE与PRIMARY KEY两者的区别是()

A.UNIQUE要求数据表中至少存在一行数据,必须在建表后创建,而PRIMARY KEY无该限制

B.UNIQUE允许空值存在,而PRIMARY KEY不允许

C.创建UNIQUE后,该数据行允许被修改,而PRIMARY KEY则不允许

D.UNIQUE列不能创建外键,而PRIMARY KEY可以创建外键


参考答案和解析
UNIQUE允许空值存在,而PRIMARYKEY不允许

相关考题:

在SQL在CREATE TABLE命令中用于定义满足实体完整性的主索引的短语是 A) DEFAULT B) UNIQUE C)CHECK D) PRIMARY KEY

设有职工表(职工号,姓名,地址1,地址2),其中,职工号为主码。现要求地址1和地址2组合起来不能有重复值。在SQL Server 2008环境中有下列创建该表的语句:1.CREATE TABLE职工表(职工号int PRIMARY KEY,姓名nchar(10),地址1 nvarchar(20),地址2 nvarchar(20),UNIQUE(地址1,地址2))Ⅱ:CREATE TABLE职工表(职工号int PRIMARY KEY,姓名nchar(10),地址1nvarchar(20).地址2 nvarchar(20)UNIQUE(地址1,地址2))Ⅲ.CREATE TABLE职工表(职工号int PRIMARY KEY.姓名nchar(10),地址1 nvarchar(20)UNIQUE,地址2 nvarchar(20)UNIQUE)IV.CREATE TABLE职工表(1职工号int PRIMARY KEY。姓名nchar(10),地址1 nvarchar(20)UNIQUE(地址1,地址2),地址2 nvarchar(20))上述语句能正确实现此约束的是( )。A.仅Ⅰ和ⅢB.仅Ⅱ和ⅣC.仅Ⅰ、Ⅱ和ⅣD.都正确

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

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.

Acandidate key is(). A.an attribute or a set of attributes with a unique value for each tuple of a relationB.a set of attributes referring to another relation in the databaseC.an attribute or a set of attributes that is potentially the primary key of a relationD.an attribute or a set of attributes that is potentially(有潜力地)the super key(超键)of a relation

创建数据表时如果要指定某一个字段为主键,应该用()参数。A、NOT NULLB、Auto_IncrementC、Primary KeyD、Key

在数据表定义时设置Primary key是数据库的实体完整性控制。

在设计数据库时,要充分考虑数据的完整性或准确性。下面关于primary key和unique的描述错误的是()A、设为unique的列的值是不能重复的,用来唯一区别unique列的值B、primary key列不可以有null值,而unique列是可以有null的C、primary key列和unique列都不可以有null值D、primary key用来在表中设置主键,主键列的值是可以重复的,用来唯一标识表中的每一条记录

在数据表定义时设置主键(Primary key)则不允许插入全为空的记录。

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

在数据表设计时,UNIQUE与PRIMAR YKEY两者的区别是()A、UNIQUE要求数据表中至少存在一行数据,必须在建表后创建,而PRIMARY KEY无该限制B、UNIQUE允许空值存在,而PRIMARYKEY不允许C、创建UNIQUE后,该数据行允许被修改,而PRIMARYKEY则不允许D、UNIQUE列不能创建外键,而PRIMARYKEY可以创建外键

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 statements are correct regarding indexes? ()A、 When a table is dropped, the corresponding indexes are automatically dropped.B、 For each DML operation performed, the corresponding indexes are automatically updated.C、 Indexes should be created on columns that are frequently referenced as part of an expression.D、 A non-deferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a uniqueindex.

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.

The InnoDB engine has a feature known as clustered indexes. Which three statements are true about clustered indexes as used in InnoDB?()A、A primary key must exist for creation of a clustered indexB、A clustered index allows fulltext searching within InnoDBC、The first unique index is always used as a clustered index and not a primary keyD、A clustered index provides direct access to a page containing row dataE、If no indexes exist, a hidden clustered index is generated based on row IDsF、A primary key is used as a clustered indexG、A clustered index is a grouping of indexes from different tables into a global index for faster searching

判断题在数据表定义时设置主键(Primary key)则不允许插入全为空的记录。A对B错

判断题在数据表定义时设置Primary key是数据库的实体完整性控制。A对B错

单选题View the Exhibit and examine the structure of the EMP table. You executed the following command to add a primary key to the EMP table:   ALTER TABLE emp   ADD CONSTRAINT emp_id_pk  PRIMARY KEY (emp_id)   USING INDEX emp_id_idx;   Which statement is true regarding the effect of the command?()A  The PRIMARY KEY is created along with a new index.B  The PRIMARY KEY is created and it would use an existing unique index.C  The PRIMARY KEY would be created in a disabled state because it is using an existing index.D  The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.

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

多选题The InnoDB engine has a feature known as clustered indexes. Which three statements are true about clustered indexes as used in InnoDB?()AA primary key must exist for creation of a clustered indexBA clustered index allows fulltext searching within InnoDBCThe first unique index is always used as a clustered index and not a primary keyDA clustered index provides direct access to a page containing row dataEIf no indexes exist, a hidden clustered index is generated based on row IDsFA primary key is used as a clustered indexGA clustered index is a grouping of indexes from different tables into a global index for faster searching

多选题在设计数据库时,要充分考虑数据的完整性或准确性。下面关于primary key和unique的描述错误的是()A设为unique的列的值是不能重复的,用来唯一区别unique列的值Bprimary key列不可以有null值,而unique列是可以有null的Cprimary key列和unique列都不可以有null值Dprimary key用来在表中设置主键,主键列的值是可以重复的,用来唯一标识表中的每一条记录

单选题在数据表设计时,UNIQUE与PRIMAR YKEY两者的区别是()AUNIQUE要求数据表中至少存在一行数据,必须在建表后创建,而PRIMARY KEY无该限制BUNIQUE允许空值存在,而PRIMARYKEY不允许C创建UNIQUE后,该数据行允许被修改,而PRIMARYKEY则不允许DUNIQUE列不能创建外键,而PRIMARYKEY可以创建外键

多选题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.

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