1Z0-051 QUESTION 29 关于约束

本文探讨了数据库中约束的应用,包括NULL值处理、唯一性约束及主键设置等关键概念。指出外键可以包含NULL值,而唯一性约束允许NULL的存在,并说明了一个表可以拥有多个作为主键组成部分的列。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

QUESTION 29
Which two statements are true regarding constraints? (Choose two.)
A. A foreign key cannot contain NULL values.
B. The column with a UNIQUE constraint can store NULLS .
C. A constraint is enforced only for an INSERT operation on a table.

D. You can have more than one column in a table as part of a primary key.

答案:BD

ABC的解析查看QUESTION 28 ;

D选项正确,一个表可以有多个主键:

SQL> create table test (
  2  id number(1),
  3  t1 varchar2(20));

Table created.


SQL> alter table test add constraint pk_test primary key(id,t1);

Table altered.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值