adspace


How many types of Cursor in SQL SERVER?

Answer Posted / anindya basu

There are four types of cursor in SQL Server which are:

a. Static
b. Dynamic
c. Forward Only, and
d. Keyset
Static keysets aren't sensitive to database changes and are scrollable.
Dynamic keysets are sensitive to database changes and are scrollable.
Forward only keysets aren't sensitive to database changes and allows only forward scrolling of data. There are 3 variants of Forward Only cursors viz. Forward Only Static, Forward Only Keyset, and Fast Forward. Fast Forward is the fastest of all cursors.
Keyset cursor supports movement from the first row to the last and vice-versa. It doesn't identify inserts but recognizes both updates and deletes.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Equi join and non equi join is possible with sql server?

1134


What is a view in sql?

1040


What are wait types?

1249


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2567


How raid can influence database performance?

1117


How do I create a trace in sql server?

1120


When should you use an instead of trigger?

1052


What is standby servers? Explain types of standby servers.

1079


What is sql or structured query language?

1227


Can sql servers link to other servers like oracle?

916


What is the difference between for xml raw and for xml auto?

1117


What are different types of constraints?

1001


How do I start sql server 2017?

1015


What is a coalesce function?

1283


Can we shrink data file in sql server?

1128