JOINS AND SUBQUERY
MULTIPLE CHOICE WITH ANSWER
Answer:
1)
All rows in the first table joined to all rows in the second table is called a cartesian product
True
False
​
2)
__________ returns rows only when there is at least one row from both the tables that matches the join conditions.
a.Outer join
b.Self join
c.Non equi join
d.Equi join
​
3)
When two tables are joined using = operator in the join condition it is called as _________
a.Outer join
b.equi join
c.Self join
d.Non equi join
​
4)
Single row subquery return ___________row
a.Many
b.Three
c.one
d.Two
​
5)
SELECT last_name, first_name
FROM employee
WHERE salary IN
(SELECT salary
FROM employee
WHERE dept_no = 3 OR dept_no = 5);
Which values are displayed?
Select one:
a. last name and first name of all employees except those working in department 3 or 5
b. last name and first name of all employees with the same salary as employees in department 3 or 5
c. last name and first name of only the employees in department number 3 or 5
d. last name and first name of only the employees whose salary falls in the range of salaries from department 3 or 5