QuestionQ231

VerifiedCreating Other Schema Objects

Review the structure of the EMPLOYEES table:

  • EMPLOYEE_ID NUMBER NOT NULL, primary key
  • EMP_NAME VARCHAR2(30)
  • JOB_ID NUMBER
  • SAL NUMBER
  • MGR_ID NUMBER, references the EMPLOYEE_ID column
  • DEPARTMENT_ID NUMBER, foreign key to the DEPARTMENT_ID column of the DEPARTMENTS table

You created a sequence named EMP_ID_SEQ to populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table.

Which two statements about the EMP_ID_SEQ sequence are true?

Choose two
Explanation

A sequence is an independent database object, not a dependent object of the table or column for which it was originally intended. The same sequence can generate values for one or multiple tables and can be used for other compatible NUMBER columns in the schema. Changes to, or removal of, the EMPLOYEES table or its EMPLOYEE_ID column do not automatically invalidate or drop the sequence; dropping it requires an explicit DROP SEQUENCE statement.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!