Oracle
1Z0-071 · Question #212
You executed the following CREATE TABLE statement that resulted in an error: SQL> CREATE TABLE employees(emp_id NUMBER(10) PRIMARY KEY, ename VARCHAR2(20), email NUMBER(3) UNIQUE, address…
The correct answer is A. The NOT NULL constraint on the ENAME column must be defined as the column level C. Only one LONG column can be used per table. See the full explanation below for the reasoning.
Question
You executed the following CREATE TABLE statement that resulted in an error:
SQL> CREATE TABLE employees(emp_id NUMBER(10) PRIMARY KEY, ename VARCHAR2(20), email NUMBER(3) UNIQUE, address VARCHAR2(500), phone VARCHAR2(20), resume LONG, hire_date DATE, remarks LONG, dept_id NUMBER(3) CONSTRAINT emp_dept_id_fk REFERENCES departments (dept_id), CONSTRAINT ename_nn NOY NULL(ename)); Identify two reasons for the error.
Options
- AThe NOT NULL constraint on the ENAME column must be defined as the column level
- BFOREIGN KEY defined on the DEPT_ID column must be at the table level only
- COnly one LONG column can be used per table
- DThe FOREIGN KEY keyword is missing in the constraint definition
- EThe PRIMARY KEY constraint in the EMP_ID column must have a name and must be defined at
How the community answered
(17 responses)- A76% (13)
- B12% (2)
- D6% (1)
- E6% (1)
Community Discussion
No community discussion yet for this question.