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
What are the essential components of sql server service broker?
what's the maximum size of a row? : Sql server database administration
How to perform backup for certificates in sql server? : sql server security
What is efficiency data?
What are entities and relationships?
What is cte (common table expression)?
What is service broker? : sql server database administration
What is the difference between primary key and unique constraints?
How to find out what is the default collation in a database?
What is resource governor in sql server?
How to delete exactly duplicate records from a table?
What is global temp table?
When cursors are useful?
Do you know what are the differences between lost updates and uncommitted dependencies?
What is the difference between varchar and nvarchar?