JOINS AND SUBQUERY
MULTIPLE CHOICE WITH ANSWER
Where can sub queries be used?
Select one or more:
a. The HAVING clause in the SELECT statement
b. The WHERE clause in only the SELECT statement
c. Field names in the SELECT statement.
d. The WHERE clause in the SELECT as well as all DML statements
e. The FROM clause in the SELECT statement
f. The GROUP BY clause in the SELECT statement
Evaluate this SQL statement:
SELECT first_name, commission
WHERE commission =
WHERE UPPER(first_name) = 'SCOTT')
What would cause this statement to fail?
a. The FIRST_NAME values in the database are in lowercase.
b. Scott has a NULL commission value.
c. There is no employee with the first name Scott.
d. Scott has a zero commission value.
e. There is more than one employee with the first name Scott.
A__________ is a join condition containing something other than an equality operator
Operators used in single row subquery are _____________
The __________ returns all rows from both the tables.
a.full outer join
c.Right outer join
d.Left outer join