The FOREIGN KEY constraint should be added to which table? a. the table representing the “one” side of a one-to-many relationship b. the parent table in a parent-child relationship c. the child table …
The FOREIGN KEY constraint should be added to which table?
a. the table representing the “one” side of a one-to-many relationship
b. the parent table in a parent-child relationship
c. the child table in a parent-child relationship
d. the table that doesn’t have a primary key
8. What is the maximum number of columns you can define as a primary key when using the
column-level approach to creating a table?
a. 0
b. 1
c. 30
d. 255
9. Which of the following commands can you use to rename a constraint?
a. RENAME
b. ALTER CONSTRAINT
c. MOVE
d. NEW NAME
e. None of the above commands can be used.
10. Which of the following is a valid SQL statement?
a. CREATE TABLE tablel
(col1 NUMBER PRIMARY KEY,
col2 VARCHAR2(20) PRIMARY KEY,
col3 DATE DEFAULT SYSDATE,
col4 VARCHAR2(2));
b. CREATE TABLE tablel
(col1 NUMBER PRIMARY KEY,
col2 VARCHAR2(20),
col3 DATE,
col4 VARCHAR2 (2) NOT NULL,
CONSTRAINT tablel_col3_ck
CHECK (col3=SYSDATE));
c. CREATE TABLE tablel
(col1 NUMBER,
col2 VARCHAR2(20),
col3 DATE,
col4 VARCHAR2(2),
PRIMARY KEY (coll));
d. CREATE TABLE tablel
(coll NUMBER,
col2 VARCHAR2(20),
col3 DATE DEFAULT SYSDATE,
col4 VARCHAR2(2);
OR