exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 178 discussion

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

SIMULATION -
You have a database that includes the following tables. All of the tables are in the Production schema.

You need to create a query that returns a list of product names for all products in the Beverages category.
Construct the query using the following guidelines:
✑ Use the first letter of the table name as the table alias.
✑ Use two-part column names.
✑ Do not surround object names with square brackets.
✑ Do not use implicit joins.
✑ Do not use variables.
✑ Use single quotes to surround literal values.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it.


Show Suggested Answer Hide Answer
Suggested Answer: See the explanation below.
1. SELECT p.productname
2. FROM Production.Categories As c
3. JOIN Production.Products As p
ON ( c.categoryid = p.categoryid )
4. WHERE c.categoryname = 'Beverages'
References:
https://docs.microsoft.com/en-us/sql/relational-databases/performance/joins?view=sql-server-2017

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
NickNnack
4 years, 5 months ago
Repeat from Q101
upvoted 1 times
...
p0lskiy
4 years, 10 months ago
Should be INNER JOIN as required to use explicit joins.
upvoted 1 times
kimalto452
4 years, 6 months ago
join is explicit... from x, b its implicit
upvoted 1 times
...
eggzamtaker
4 years, 5 months ago
"JOIN" is the same as "INNER JOIN". smh.
upvoted 1 times
...
...
xd1
5 years, 2 months ago
no need for the brackets
upvoted 3 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 ...