题目
4510_COMP_SCI_X_0019 Quiz 4
单项选择题
Which of the following SQL queries will list only the Full Names of all Customers who made Purchases on 2019-04-02?
选项
A.SELECT *
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustID;
B.SELECT GivenName,FamilyName
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustIDWHERE PurchaseDate = '2019-04-02';
C.SELECT * FROM Customer AND Purchase
WHERE PurchaseDate LIKE '2019-04-02';
D.SELECT GivenName,FamilyName
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustID
WHERE PurchaseDate = '2019-04-02';
查看解析
标准答案
Please login to view
思路分析
We start by restating the problem in our own words and then evaluate each option.
Option 1:
SELECT *
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustID;
This query selects all columns from the joined Customer and Purchase tables for every matching row. It does not filter by a specific PurchaseDate, so it will list all purchases across all dates, and will also include many columns beyond Just GivenName and FamilyName. Therefore, it does not meet the requirement of listing only the Full Names for purcha......Login to view full explanation登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
Candy Database Candy ( CandyType char(15), Cost dec(9,2), Colour char(10)) People ( PersonName char(20), Age smallint, Suburb char(20), PhoneNumber char(10)) Likes ( PersonName char(20), CandyType char(15)) Use the drop down lists to re-write the following query as a INNER JOIN. Select C.CandyType, Cost, PersonName From Candy C, Likes L Where C.CandyType = L.CandyType And PersonName like '%Peter%' Select C.CandyType, Cost, PersonName [ Select ] From Candy C INNER JOIN Likes L INNER JOIN People P L Likes INNER JOIN C Candy From Candy C INNER JOIN Likes L [ Select ] On C.CandyType = L.CandyType Where C.CandyType = L.CandyType On C.CandyType = P.PersonName [ Select ] Having P.PersonName like '%Peter%' Where PersonName like '%Peter%' And PersonName like '%Peter%'
Creating an "Outer Join" in Access will produce ONLY Null Values.
The default join type in Access is the outer join.
Below are the Movies and Sales table of a relational database: Dexter has created the following SQL query: SELECT tblMovies.Title, tblMovies.Genre, tblSales.CopiesFROM tblMovies, tblSalesWHERE tblMovies.MovieID = tblSales.MovieID How many records will be returned by the query?
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!