exam questions

Exam 70-464 All Questions

View all questions & answers for the 70-464 exam

Exam 70-464 topic 1 question 81 discussion

Actual exam question from Microsoft's 70-464
Question #: 81
Topic #: 1
[All 70-464 Questions]

DRAG DROP -
You have two existing tables, one named COUNTRY and the other named STATES.
The tables are defined as follows:

You need to set up a rule that every STATES.Country_Abbr must match an existing record in the COUNTRY table.
Develop the solution by selecting and arranging the required code blocks in the correct order.
You may not need all of the code blocks.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Note:
To allow naming of a FOREIGN KEY constraint, and for defining a FOREIGN KEY constraint on multiple columns, use the following SQL syntax:
MySQL / SQL Server / Oracle / MS Access:

ALTER TABLE Orders -

ADD CONSTRAINT fk_PerOrders -
FOREIGN KEY (P_Id)
REFERENCES Persons(P_Id)

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Luzix
4 years, 7 months ago
< table_constraint > ::= [ CONSTRAINT constraint_name ] { {PRIMARY KEY | UNIQUE } { NONCLUSTERED (column [ ASC | DESC ] [ ,... n ]) | NONCLUSTERED HASH (column [ ,... n ] ) WITH ( BUCKET_COUNT = bucket_count ) } | FOREIGN KEY ( column [ ,...n ] ) REFERENCES referenced_table_name [ ( ref_column [ ,...n ] ) ] | CHECK ( logical_expression ) }
upvoted 1 times
...
Iuliana16
4 years, 10 months ago
In the exam, they ask you to put three syntax: Alter table STATES ADD FOREIGN KEY FK_StateCountry REFERENCES Country(Country_Abbr)
upvoted 1 times
...
CodeMaestro
4 years, 11 months ago
sorry I had not checked the answer
upvoted 1 times
...
CodeMaestro
4 years, 11 months ago
on the FOREIGN KWY it should be FOREIGN KEY (Country_Abbr)
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...