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 are sql servers used for?

975


Explain try...catch with sql server?

977


How to delete all rows with truncate table statement in ms sql server?

929


Explain error and transaction handling in sql server?

948


What are the restraints imposed on the table design by a merge replication?

981


What do you mean by a Composite primary key?

1025


What are the recovery models in sql server 2000?

925


What is the difference between row_number and dense_rank?

825


Where sql server user names and passwords are stored in sql server? : sql server database administration

992


What is normalization? What number of normalization shapes are there?

1054


How to name query output columns in ms sql server?

915


What is the difference between Stored Procedures and triggers?

1031


How to find the login name linked to a given user name?

939


What do you mean by the term 'normalization'?

1122


what are database files and filegroups? : Sql server database administration

882