what is the cursor

Answer Posted / om shivaya namaha

Cursors are used to fetch the records row by row data in a
table but get the data very fast by using the cursors it is
very useful if the table contains few records in a table but
will create a performance isses if the table contain lot of
records

create cursor cursorName for
select EmpId,EmName from Employees
open cursor
while (@@FetchStatus==0)
begin
fetch next from cursorName into @EmpId , @EmName
select * from Employee where empid=@empid
end
close cursor

Is This Answer Correct ?    24 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between URL and URI?

622


How does exception management works in ASP.NET?

605


what are the Custom controls in asp.net?

560


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1595


What is the biggest disadvantage of “Other Return Types” in Web API?

923






How can we use Web API with ASP.NET Web Form?

640


What is http protocol and how it works?

523


Why session is necessary in web application?

509


What is application session?

498


Can you set the session out time manually?

371


What is special types forms

530


What is the base class from which web forms are inherited?

524


What are the benefits of Razor View?

530


What is ashx file in asp.net?

544


What is Partial PostBack in ASP.NET?

597