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

Mention a few common trace flags used with sql server?

893


How to end a stored procedure properly in ms sql server?

1028


What are the properties of the transaction?

973


Explain the microsoft sql server delete command? : SQL Server Architecture

1021


What are the dmvs?

959


How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?

997


Can you explain powershell included in sql server 2008?

900


Why use identity in sql server?

1026


What are sp_configure commands and set commands?

965


Define right outer join in sql server joins?

991


Tell me what are the advantages of using stored procedures?

958


What are the 3 types of schema?

1050


Explain the difference between cross join and full outer join?

928


Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?

128


what are the core components of SSRS?

123