Simple example for difference between select and cursor in sql
- 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 |
Scalability, Availability, Integration with internet, etc.)?
What do you understand by replication in sql server? Mention the different types of replication in sql server.
What is table valued function and scalar valued functions?
What is triggers and its types?
If a table does not have a unique index, can a cursor be opened on it?
How to apply cascading referential integrity in place of triggers?
What do you mean by cardinality?
what are isolation levels? : Sql server database administration
Explain user defined views?
What is the difference between drop table and truncate table?
what is Full Text Search ?
How will you fine tune a stored procedure or what are the steps that should be taken to fine tune or optimize a stored procedure?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)