nerdexam
Oracle

1Z0-061 · Question #9

Evaluate the following SQL commands: The command to create a table fails. Identify the two reasons for the SQL statement failure?

The correct answer is A. You cannot use SYSDATE in the condition of a check constraint. C. You cannot use the NEXTVAL sequence value as a default value for a column. CHECK Constraint The CHECK constraint defines a condition that each row must satisfy. The condition can use the same constructs as the query conditions, with the following exceptions: SYSDATE, UID, USER, and USERENV functions Queries that refer to other values in other rows A…

Install and Administer Oracle RAC

Question

Evaluate the following SQL commands:

The command to create a table fails. Identify the two reasons for the SQL statement failure?

Exhibit

1Z0-061 question #9 exhibit

Options

  • AYou cannot use SYSDATE in the condition of a check constraint.
  • BYou cannot use the BETWEEN clause in the condition of a check constraint.
  • CYou cannot use the NEXTVAL sequence value as a default value for a column.
  • DYou cannot use ORD_NO and ITEM_NO columns as a composite primary key because ORD_NO is

How the community answered

(51 responses)
  • A
    84% (43)
  • B
    10% (5)
  • D
    6% (3)

Explanation

CHECK Constraint The CHECK constraint defines a condition that each row must satisfy. The condition can use the same constructs as the query conditions, with the following exceptions: SYSDATE, UID, USER, and USERENV functions Queries that refer to other values in other rows A single column can have multiple CHECK constraints that refer to the column in its definition. There is no limit to the number of CHECK constraints that you can define on a column. CHECK constraints can be defined at the column level or table level. CREATE TABLE employees Salary NUMBER(8, 2) CONSTRAINT emp_salary_min CHECK (salary > 0),

Topics

#check constraints#SYSDATE constraint#NEXTVAL default#DDL

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice