Search This Blog

Tuesday, September 11, 2012

What is an alternative of CURSOR in SQL?

The alternative of CURSOR depends on what the developers want to perform.
On the basis of your task you can use the following to avoid cursor..
1. WHILE loop
2. User defined function
3. Temporary Table
4. Joined complex sql query etc..


Note: Sometimes the use of cusor becomes better than its' alternative. Because sometime alternative takes more execution time than cursor.

No comments:

Post a Comment