Skip to Main Content

Select Into VS Cursor

Paulo A. KünzelNov 25 2022

Case:
We have tables that need to be queried and are supposed to return always a single value. The resulting values are to be stored in variables for use further down the script/algorithm
Question:
Is there a reason to use a cursor over a select into in this situations?
I'm working in a place where all PL/SQL devs refuse to use select to and claim that a cursor is better, faster, safer, etc... is this true?
We are working on a system that is a bit older and didn't get many constraints applies. So I see a lot of issues with the cursor not returning anything or too many rows... in either case the code doesn't throw an error, but the process is wrong and we find out days later.

This post has been answered by BluShadow on Nov 25 2022
Jump to Answer
Comments
Post Details
Added on Nov 25 2022
6 comments
134 views