exam questions

Exam 70-464 All Questions

View all questions & answers for the 70-464 exam

Exam 70-464 topic 1 question 14 discussion

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

You plan to create a database that has multiple tables. The tables will contain product information. Each product has a stock-keeping unit (SKU).
You need to recommend a solution to ensure that each SKU starts with the letters "ADV" and is followed by 10 digits.
The solution must minimize the amount of development effort required.
What should you include in the recommendation?

  • A. A FOREIGN KEY constraint
  • B. A trigger
  • C. A user-defined data type
  • D. A CHECK constraint
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
LiamLin
3 years, 9 months ago
I tried with CHECK CONSTRAINT and it's ok CREATE TABLE Product( SKU VARCHAR(50) NOT NULL, CONSTRAINT CHK_SKU CHECK (SKU LIKE 'AVD[0-9][0-9]' OR SKU NOT LIKE 'AVD%') ) INSERT INTO Product VALUES('AVD29') --Success INSERT INTO Product VALUES('AVD356') --Fail INSERT INTO Product VALUES('AVD') --Fail INSERT INTO Product VALUES('SFC') --Success GO SELECT * FROM Product GO DROP TABLE Product GO
upvoted 1 times
...
Dolous
4 years, 5 months ago
can't this be achieved with something like; CHECK (SKU LIKE 'ADV[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
upvoted 2 times
...
Kepty
4 years, 6 months ago
Seems Ok. I'm not sure whether to use CHECK with UDF or this, but probably creating of User-Defined Data Types is less complicated than CHECK with UDF.
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 ...