Quote Originally Posted by gandolf989
Unless you only want one row or you are doing a bulk collect into a collection don't use a select into.
Gandolf, I'm confused by this statement.
If I read right, you are saying for:

SINGLE rows, use select into (implicit cursor)
MULTIPLE rows use select bulk collect into (again, implicit cursor)

What else is there (aside from a cursor that returns no rows)?

Quote Originally Posted by gandolf989
I suppose I could have also done a select into with rownum=1. Either way I would have to handle the error if no data was found, which meant that the row did not exist.
I'm not sure the function based approach is the best here. If I have a table with no rows and issue:

SQL> TRUNCATE TABLE j1;

Table truncated.

SQL> SELECT COUNT(*)
2 FROM j1;

COUNT(*)
----------
0

There is no error handling required. I'm completely open to new ideas, were you simply trying to improve readability, or is there another reason?
Thanks,
J