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 should be the fill factor for indexes created on tables? : sql server database administration

1138


List the different types of collation sensitivities in sql server?

1044


What is sql injection and why is it a problem? : sql server security

1132


What is a print index?

886


What is the difference between coalesce() & isnull()?

1132


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

1064


Explain trigger and its types?

1067


How to get the definition of a view out of the sql server?

987


What is set nocount on?

940


When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?

1101


What is the difference between getdate and sysdatetime?

1007


What is transaction server auto commit?

1065


State a few properties of relational databases?

1128


What is scan table/view and seek table/view when its occurs? : sql server database administration

1052


What is 1nf 2nf?

1009