.Net Framework, Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML

Ado.netAsp.Net 2.0SQLC-SharpXMLFrameworkIISXMLWebServiceArchitecture
UMLProject ManagementSDLCMethodologiesDesign PatterenOOPWCF.Net RemotingWWF
MVPMVCSilver LightN-HibernateAjaxJ-QuerySEO-MarketingSite MapPhp
TransactionXML bulk Insertion into SQL Server
SQL JoinsCursor
Isolation Level Difference in procedure & function
Indexing in SQL SSIS - DTS
Union
Alter in Sql
What is cursor in sql ?
Cursor is a database object, can hold a set of data

Declare Cur_temp Cursor

For

Select GR_GROUP_ID from T_RMGR_GROUP

Open Cur_temp

declare @GR_GROUP_ID int

Fetch NEXT FROM Cur_temp into @GR_GROUP_ID

While (@@FETCH_STATUS <> -1) -- means no error(-1)

begin

print 'record'

select @GR_GROUP_ID as GR_GROUP_ID

Fetch NEXT FROM Cur_temp

end

Close Cur_temp

DEALLOCATE Cur_temp
How many type of cursor there in sql ?
There are 4 types of cursors.
1.forward Only (Default)
2.Static
3.Keyset
4.Dynamic
 
Leave your comment.
Name
Email
Comments
Tell Us5832+5 =

Reduce your Dialy IT Cost, Consult with us
Stay healthy in recession

Advertisement
Sponsored by

Privacy Policy ©2009 ETG Consultancy, All Rights Reserved Terms & Conditions
Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML