Menu

1. Which of the following statements is correct? a. A PRIMARY KEY constraint allows NULL values in the primary key column(s). b. You can enable a dropped constraint if you need it in the future. c. Ev…

1. Which of the following statements is correct?
a. A PRIMARY KEY constraint allows NULL values in the primary key column(s).
b. You can enable a dropped constraint if you need it in the future.
c. Every table must have at least one PRIMARY KEY constraint, or Oracle 12c doesn’t
allow the table to be created.
d. None of the above statements is correct.
2. Which of the following is not a valid constraint type?
a. PRIMARY KEYS
b. UNIQUE
c. CHECK
d. FOREIGN KEY
3. Which of the following SQL statements is invalid and returns an error message?
a. ALTER TABLE books ADD CONSTRAINT books_pubid_uk UNIQUE (pubid);
b. ALTER TABLE books ADD CONSTRAINT books_pubid_pk PRIMARY KEY (pubid);
c. ALTER TABLE books ADD CONSTRAINT books_pubid_nn NOT NULL (pubid);
d. ALTER TABLE books ADD CONSTRAINT books_pubid_fk FOREIGN KEY (pubid)
REFERENCES publisher (pubid);
e. All of the above statements are invalid.
4. What is the maximum number of PRIMARY KEY constraints allowed for a table?
a. 1
b. 2
c. 30
d. 255
5. Which of the following is a valid SQL command?
a. ALTER TABLE books ADD CONSTRAINT UNIQUE (pubid);
b. ALTER TABLE books ADD CONSTRAINT PRIMARY KEY (pubid);
c. ALTER TABLE books MODIFY (pubid CONSTRAINT NOT NULL);
d. ALTER TABLE books ADD FOREIGN KEY CONSTRAINT (pubid) REFERENCES
publisher (pubid);
e. None of the above commands is valid.
6. How many NOT NULL constraints can be created at the table level by using the CREATE
TABLE command?
a. 0
b. 1
c. 12
d. 30
e. 255

OR