.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

What are different types of cursors available in SQL Server?

Posted By :volvo     Posted Date :November 28, 2013    Points :40   Category :Sql Server 
Following are different types of cursors available in SQL Server 2005
Base table
Static
Forward-only
Forward-only/Read-only
Keyset-driven
Base table: Base table cursors are the lowest level of cursor available. Base table cursors can scroll forward or backward with minimal cost, and can be updated
Static: Cursor can move to any record but the changes on the data can't be seen.
Dynamic: Most resource extensive. Cursor can move anywhere and all the changes on the data can be viewed.
Forward-only: Cursor moves one step forward, can't move backwards.
Keyset-driven: Only updated data can be viewed, deleted and inserted data cannot be viewed.

You can also find related Interview Question to What are different types of cursors available in SQL Server?  below: 

What are the types of indexes available with SQL Server?

  
There are basically two types of indexes that we use with the SQL Server. Clustered and the Non-Clustered. (More...)

How many types of tables are present in SQL SERVER?

  
There are 2 types of temporary tables, local and global in sql server.

Local temporary tables are created using a single pound (#) sign and are visible to a single connection and automatically dropped when that connection ends.

Global temporary tables are created using a double pound (##) sign and are visible across multiple connections and users and are automatically dropped when all SQL sessions stop referencing the global temporary table. (More...)

Explain different types of cursors.

  
Implicit cursors:
these cursors are invoked implicitly. User need not create, open, fetch or close the cursor.

Explicit cursors:
these cursors are not invoked implicitly. User needs to create, open, fetch or close the cursor.

Static Cursor:
Stores a complete copy of the result set. Used mostly where scrolling is required. Static cursors don't support updates.


Forward -only cursors:
This cursor supports updates but not scrolling. It supports only fetching serially. Rows are not retrieved from the database until they are fetched.


Forward - only cursors /Read only cursor:
These are the fastest of the cursors and cannot be updated. They cannot be created on query that returns only read only columns.


Key set driven:
It is a scrollable cursor that cannot be updated. These cursors are controlled by a set of physical identifiers called as key set. The keyset is built in a temporary table when the cursor is opened. (More...)

What are the types of indexes available with SQL Server?

  
There are basically two types of indexes that we use with the SQL Server. Clustered and the Non-Clustered. (More...)

How many types of Stored Procedures are there in Sql Server?

  
1. User Defined Stored Procedures.
a. Transact-SQL stored procedure
b. CLR Stored Procedure.

2. System Stored Procedures (More...)

What are the two types of Triggers in SQL Server?

  
1. After Triggers : Fired after Insert, Update and Delete operations on a table.
2. Instead of Triggers: Fired instead of Insert, Update and Delete operations on a table.

(More...)

What are the 2 types of Temporary Tables in SQL Server?

  
1. Local Temporary Tables
2. Global Temporary Tables

(More...)

What are the Lock Types in SQL server?

  
Shared lock
Update lock
Exclusive lock (More...)

Database Concurrency in Sql Server.

  
When two or more user try to update same type of data in a table then Database Concurrency helps in this situation.

There are 2 types of Database Concurrency

Pessimistic: When one user try to change the data with pessimistic concurrency then a lock is placed on the data in a table so that another user cannot change data. when one user finishes then other user can able to change.

Optimistic: When two user works on the same data in a table and one change that data first then second user cannot change that same data becasue the which he have using is allready changed so he cannot do the change becasue change apply to another data that is changed by first user. (More...)

Is it true that COM objects no longer need to be registered on the server?

  
Yes and No. Legacy COM objects still need to be registered on the server before they can be used. COM developed using the new .NET Framework will not need to be registered. Developers will be able to auto-register these objects just by placing them in the 'bin' folder of the application. (More...)

What are server controls?

  
ASP.NET server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend