Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Implicit vs. Explicit cursors
Kenneth C Stahl wrote in message <392E9441.FE8CAB23_at_Unforgettable.com>...
>Also, completely forget about OPEN/FETCH/CLOSE for explicit cursors.
>Always use a cursor FOR loop. Once you get used to writing them and
>handling all of the possible exceptions/errors you'll never want to go
>back to the OPEN/FETCH/CLOSE syntax. Steve Feuerstein got this wrong in
>his book and too many people follow his advice without thinking through
>all of the consequences (he claims that there are no adverse
>consequences and tries to lead the reader to believe that there are
>inherent problems with the cursor FOR loop and trusts that the reader
>won't know better).
Not in the second edition of his "Oracle PL/SQL Programming" book O'Reilley, ISBN 1-56592-335-9) he doesn't. On page 33 he says:
"The cursor FOR loop is one of my favourite PL/SQL constructs. It leverages fully the tight and effective integration of the Ada-like programming language with the power of the SQL database language. It reduces the volume of the code you need to write to fetch data from a cursor. It greatly lessens the chance of introducing errors in your programming - and loops are one of the more error-prone parts of a program. Does this loop sound too good to be true? Well, it isn't - it's all true."
What book of Steven's were you reading?
Dave.
-- If you reply to this posting by email, remove the "nospam" from my email address first.Received on Sat May 27 2000 - 00:00:00 CDT