Found or Not Found, That is The Question. Do You Have The Answer?

Here is a new puzzler from Steven Feuerstein:

Which of the following circumstances does not raise a NO_DATA_FOUND exception? (Hint: There is more than one)

  1. A SELECT INTO statement that finds no rows
  2. A numeric FOR loop whose low value or high value is NULL
  3. An attempt to get the value of an element in a collection whose index is not defined
  4. Reading past the end of a file with UTL_FILE
  5. Reading past the end of a BFILE with DBMS_LOB
  6. A SELECT BULK COLLECT INTO statement that finds no rows
  7. A SELECT COUNT(*) INTO statement that finds no rows
  8. A SELECT my_function FROM dual, where my_function is a function that raises a NO_DATA_FOUND exception.

I have added 6, 7 and 8 to the list above just to make it a little bit more interesting. I’m not going to tell you the answer, but I will give you the following hints:

Now, the first person who posts the correct answer in the comment section below will get an iPhone…just kidding of course, but he or she will get a big round of applause. You can also send your answers to Puzzler@toadworld.com, you may win a t-shirt.


Possibly related:


Tagged | Post a Comment