Fundamentals of the SQL SELECT Statement


In groups and on the black board: Exercise 4.2 from the KSS book.


In groups and on the black board: write SQL select statements for the following queries based on the database example used in the course.

  1. Find the first name, last name, and the course id of all teachers that gives the course 'OOP' or 'OOA&D'
  2. Find the exercise id, exercise text, and answer text to lecture number 3 for the OOP course. The output should be ordered on the exercise id.
  3. Find the teachers that do not give any course.
  4. Find the course id and lecture number that do not have any slides available via the course home page.

In pairs, construct use JDBC and preparedStatements to print the result of the queries in Exercise B.