The Exists clause To demonstrate the use of the exists clause we will create two fictitious tables and populate them with some data. Lets see the contents of our loans table. Now lets create our table of loan defaulters and add some data to it.
Lets see the contents of our defaulters table.
Here is our task, to calculate the value owing by persons who have defaulted on their loans. Now I hear you saying, 'That looks very similar in function to an inner join from Tutorial 7 '. Remember the quote from the last lesson. It is another way of doing the same thing. The difference lays in the relative performance of the two statements.