We help IT Professionals succeed at work.

Can most Cursor code be replaced with a where exists structure

brgdotnet
brgdotnet asked
on
As an alternative to using a cursor, can using a where exists clause be used instead. I would like some expert opinions about this.
Comment
Watch Question

EE Topic Advisor
Most Valuable Expert 2014
Awarded 2013
Commented:
yes that could be possible.

but it won't always be so simple, you have asked an very broad question.
Vitor MontalvãoIT Engineer
Distinguished Expert 2017
Commented:
Not always for sure.
If you have any particular case please share it with us so we can give an assertive answer.
Scott PletcherSenior DBA
Most Valuable Expert 2018
Distinguished Expert 2019
Commented:
In general, no.  Most often a cursor is not used just to avoid an EXISTS().