OCP 1Z0 052 165
2014-06-22 22:17
155 查看
165. You have an ORDERS table with the following structure:
Name Null? Type
------------------------- -------- -------------------------
OID NUMBER(6)
ODATE DATE
CCODE NUMBER(6)
OAMT NUMBER(10,2)
The table has data in the ODATE column for all rows. Many orders are placed in a single day. You need to
ensure that the ODATE column must contain data for every order in future. Which method would serve
the purpose?
A.Modify the column using the ALTER TABLE...MODIFY command.
B.Add a UNIQUE constraint to the column using the ALTER TABLE...ADD CONSTRAINT command.
C.Add a NOT NULL constraint to the column using the ALTER TABLE...ADD CONSTRAINT command.
D.Add a PRIMARY KEY constraint to the column using the ALTER TABLE...ADD CONSTRAINT
command.
Answer: A
我认为按需求过说,D也对
Name Null? Type
------------------------- -------- -------------------------
OID NUMBER(6)
ODATE DATE
CCODE NUMBER(6)
OAMT NUMBER(10,2)
The table has data in the ODATE column for all rows. Many orders are placed in a single day. You need to
ensure that the ODATE column must contain data for every order in future. Which method would serve
the purpose?
A.Modify the column using the ALTER TABLE...MODIFY command.
B.Add a UNIQUE constraint to the column using the ALTER TABLE...ADD CONSTRAINT command.
C.Add a NOT NULL constraint to the column using the ALTER TABLE...ADD CONSTRAINT command.
D.Add a PRIMARY KEY constraint to the column using the ALTER TABLE...ADD CONSTRAINT
command.
Answer: A
SQL> alter table orders modify odate not null; Table altered. SQL> alter table orders modify odate null; Table altered. SQL> alter table orders add constraints ch_odate check(odate is not null); Table altered.
我认为按需求过说,D也对
相关文章推荐
- [每日一题] 11gOCP 1z0-052 :2013-09-9 PL/SQL package body...........................................A46
- OCP-1Z0-052-V8.02-23题
- [每日一题] 11gOCP 1z0-052 :2013-09-21 automatic maintenance window..........................B53
- OCP-1Z0-052-V8.02-20题
- OCP-1Z0-052-V8.02-120题
- OCP-1Z0-052-V8.02-44题
- OCP-1Z0-052-V8.02-89题
- OCP-1Z0-052-V8.02-136题
- OCP 1Z0 052 14
- OCP 1Z0 052 30
- OCP 1Z0 052 45
- OCP 1Z0 052 61
- OCP 1Z0 052 76
- OCP 1Z0 052 92
- OCP 1Z0 052 108
- OCP 1Z0 052 134
- OCP 1Z0 052 148
- OCP 1Z0 052 160
- OCP 1Z0 052 187
- [每日一题] 11gOCP 1z0-052 :2013-09-9 PL/SQL package body...........................................A46