SELECT INTO or a Cursor Fetch
570901Apr 23 2007 — edited Apr 24 2007When I create a function that only queries one row and returns a value, is it better
to declare a cursor and in then open it and fetch the row in the executable section.
or
just do a SELECT ... INTO in the executable section.
just wondering. I usually do SELECT INTO, but another developer here does declares the cursor.
my guess is declare the cursor, because it is closed after the its used.
and who knows what happens to the SELECT INTO when in it is finished.
Anyone?