网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
在SQL语言中PRIMARY KEY的作用是()。
A
定义主码
B
定义外部码
C
定义处部码的参照表
D
确定主码类型
参考答案
参考解析
解析:
暂无解析
更多 “单选题在SQL语言中PRIMARY KEY的作用是()。A 定义主码B 定义外部码C 定义处部码的参照表D 确定主码类型” 相关考题
考题
下列SQL句中,能够实现参照完整性控制的语句是()。
A. FOREIGN KEYB. PRIMARY KEYC. REFERENCESD. FOREIGN KEY 和REFERENCES
考题
在SQL语言中,______子句能够实现关系参照性规则。A.PRIMARY KEYB.NO TNULLC.FOREIGN KEYD.FOREIGN KEY...REFERENCES...
考题
为表TEST中ID列添加主键约束的语法是()A、ALTER TABLE TEST CHANGE( ID INT PRIMARY KEY)B、ALTER TABLE TEST ADD( ID INT PRIMARY KEY)C、ALTER TABLE TEST MODIFY( ID INT PRIMARY KEY)D、ALTER TABLE TEST ADD CONSTRAINT PK PRIMARY KEY (ID)
考题
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.
考题
You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()A、ALTER TABLE students ADD PRIMARY KEY student_id;B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);C、ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);D、ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);
考题
单选题You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named named Dworks in the instance. The Dworks table has a table named BillDetails which has a clustered primary key named BillId on the BillId column. The BillDetails table has a single XML column named GoodsDetails. The XML column has an XML index and XML data are stored in this XML column. A new column named GoodsID is added to the BillDetails table. GoodsID must be included in the primary key. So what action should you perform to achieve this goal?()A
You should drop the XML index on the table. Modify the primary key. Recreate the XML index B
You should alter the XML index and set the ALLOW_ROW_LOCKS = OFF option. Alter the primary key and set the ALLOW_ROW_LOCKS = ON option. C
You should move the XML data to a temporary table. Clear the XML data from the original table by setting the GoodsDetails column to NULL. Modify the primary key. Repopulate the ProductSpecs column. D
You should disable the XML index on the GoodsDetails column. Modify the primary key.Enable the XML index on the ProductSpecs column.
考题
单选题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()A
ALTER TABLE students ADD PRIMARY KEY _ id;B
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);C
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;D
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);E
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
考题
多选题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.
考题
单选题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()A
ALTER TABLE students ADD PRIMARY KEY student_id;B
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);C
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;D
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);E
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
热门标签
最新试卷