Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Simple example for difference between select and cursor in sql

Answer Posted / manoj pandey

- SELECT is a Query operator, which is also called a set-based approach.

- CURSOR is a looping operator, which is also called a iterative approach or no-set based approach.

Ideally SELECT is more performant than CUSROSR, but there are certain scenarios when CURSOR are the last approach and sometimes beneficial.

More about Cursors:
- Cursor Life Cycle: http://sqlwithmanoj.wordpress.com/2010/10/24/sql-server-cursor-life-cycle/
- Cursor Performance: http://sqlwithmanoj.wordpress.com/2011/02/07/avoid-cursors-or-use-them-optimally/

Check my blog for more Interview Questions: http://sqlwithmanoj.wordpress.com/interview-questions/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does select 1 mean?

972


What are different types of constraints?

967


What is user-defined functions? What are the types of user-defined functions that can be created?

1075


What are the purpose of Normalisation?

1092


Tell me what is log shipping?

1029


Which is faster statement or preparedstatement?

1000


whats the maximum size of view state??

2246


What are scalar functions?

1046


Is sql different from sql server?

1156


What is the difference between sdf and mdf?

1349


Do you know what is fill factor and pad index?

1041


You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?

1154


What is database black box testing?

1069


How do I view a stored procedure in sql server query?

974


What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?

141