Which of the following queries on table STUDENT will return three values as a re
ID: 3707145 • Letter: W
Question
Which of the following queries on table STUDENT will return three values as a result?
STUDENT
Observe the table STUDENT:
STUDENT
StudentID SSN Name Class
D111 111-11-1111 Connor Freshman
D222 222-22-2222 Trevor Freshman
D333 333-33-3333 Connor Sophomore
D444 444-44-4444 Parker Sophomore
D555 555-55-5555 Connor Sophomore
Select one:
a. SELECT name FROM student;
b. SELECT class FROM student;
c. SELECT DISTINCT name FROM student;
d. SELECT name FROM student WHERE class != 'Sophomore';
Explanation / Answer
Ans) The correct answer is Option c, i.e; SELECT DISTINCT name FROM student;
Explanation:
SELECT DISTINCT name FROM student; will print only the DISTINCT values from the "name" column in the "STUDENT" table and the above query will on table STUDENT will return three values as a result as follows.
connor
Trevor
Parker
coming to remaining options they are wrong because option a will print all the names from student table and coming to option b it will print all the values of a class column and coming to option d it will print all the names from student table except sophomore. so this is also wrong.
Hope this Helps, if you have any doubs please comment i will get back to you and please thumbs up, thank you.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.