Questions
BUS-308-03 Quiz 4: SQL Design & Query
Single choice
A student has used the following query to retrieve data from the Employee table (it has 8 records) and the Department table (it has 4 records). The result of his query is 32 records in the output table. What is wrong with his query? SELECT Employee.First_Name, Employee.Last_Name, Department.Depart_Name FROM Employee, Department
Options
A.The student has to use WHERE to connect PK and FK in the relationship.
B.The student has to use HAVING to connect PK and FK in the relationship.
C.The student has to query from one table only.
D.The student has to ORDER BY the results in ascending order.
View Explanation
Verified Answer
Please login to view
Step-by-Step Analysis
The scenario describes a student querying two tables, Employee (8 records) and Department (4 records), and getting 32 rows in the result. This multiplication of 8 by 4 indicates a Cartesian product, meaning every row from Employee is paired with every row from Department.
Option 1: The student has to use WHERE to connect PK and FK in the relationship.
This is the co......Login to view full explanationLog in for full answers
We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!
Similar Questions
In a consumer society, many adults channel creativity into buying things
Economic stress and unpredictable times have resulted in a booming industry for self-help products
People born without creativity never can develop it
A product has a selling price of $20, a contribution margin ratio of 40% and fixed cost of $120,000. To make a profit of $30,000. The number of units that must be sold is: Type the number without $ and a comma. Eg: 20000
More Practical Tools for Students Powered by AI Study Helper
Making Your Study Simpler
Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!