Can most Cursor code be replaced with a where exists structure

As an alternative to using a cursor, can using a where exists clause be used instead. I would like some expert opinions about this.
LVL 2
brgdotnetcontractorAsked:
Who is Participating?
 
PortletPaulfreelancerCommented:
yes that could be possible.

but it won't always be so simple, you have asked an very broad question.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Not always for sure.
If you have any particular case please share it with us so we can give an assertive answer.
0
 
Scott PletcherSenior DBACommented:
In general, no.  Most often a cursor is not used just to avoid an EXISTS().
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.