A.5. Chapter 5

  1. Add a clause to the WHERE condition to make the following query return only the department names without employees:

    select employee_id "Emp ID", last_name || ', ' ||
      first_name "Name", department_name "Dept"
    from employees e,departments d
    where e.department_id(+) = d.department_id;

    Answer: The following clause added to the WHERE condition makes the query return only department names without employees:

    and employee_id is null
  2. A type of query that has either too few or no join conditions is known as a ___________ query.

    Answer: Cartesian product

  3. Name three kinds of equijoins.

    Answer: Inner joins, self-joins, left outer joins, right outer joins, and full outer joins are all examples of equijoins.

  4. A natural join makes what assumption between ...

Get Oracle Database Foundations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.