Which two statements are true regarding constraints?

Which two statements are true regarding constraints? (Choose two.)

Which two statements are true regarding constraints? (Choose two.)

A.
A table can have only one primary key and one foreign key.

B.
A table can have only one primary key but multiple foreign keys.

C.
Only the primary key can be defined at the column and table levels.

D.
The foreign key and parent table primary key must have the same name.

E.
Both primary key and foreign key constraints can be defined at both column and table levels.



Leave a Reply 11

Your email address will not be published. Required fields are marked *


viji

viji

i think option E is wrong.could anyone explain. how is it correct?

cvkumar

cvkumar

read 3 time

Nikhil

Nikhil

please read the books…

Justyna

Justyna

11g, SQl Fundamentals I

FK constraint: Defined at either the table level or the column level

The same for PK.

banu

banu

Option B:
Does this mean Primary key can be declared for only one column?

We can define primary key for more than one column.
constraint constraint_name primary_key(col1,col2);

Justyna

Justyna

Option B means that we can have only one Primary key for a table but can consists of one or more columns.

melese

melese

more than one column to together can be primary key.
is it mean that only one primary key?.i am confused .make clear any body please?

Justyna

Justyna

Yes, PK can consists of one of more columns. But table can have only one PK.

Ritam Tiwari

Ritam Tiwari

DEFINING PRIMARY KEY AT COLUMN LEVEL AND TABLE LEVEL:

a. Column Level

CREATE TABLE Products
(
ProductID INT CONSTRAINT pk_products_pid PRIMARY KEY,
ProductName VARCHAR(25)
);

b. Table Level

CREATE TABLE Products
(
ProductID INT,
ProductName VARCHAR(25),
CONSTRAINT pk_products_pid PRIMARY KEY(ProductID)
);

friv

friv

Philosophy has also given us the ability to nuance, an ability that has given us diplomacy. Diplomacy has saved he the world many times from possible conflicts. In contrast one person who said with pride that he does not nuance was George Bush. Thus he neither philosophizes. In many respects he has made the world a more dangers places because he does not nuance and therefore has not engaged much in diplomacy, that world saving activity.

http://friv.party/