USE AdventureWorks
GO
DECLARE @ProductID INT
DECLARE @getProductID CURSOR
SET @getProductID = CURSOR FOR
SELECT ProductID
FROM Production.Product
OPEN @getProductID
FETCH NEXT
FROM @getProductID INTO @ProductID
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @ProductID
FETCH NEXT
FROM @getProductID INTO @ProductID
END
CLOSE @getProductID
DEALLOCATE @getProductID
GO
hello
asp.net c#,sql server,use sqlhelper class, funcation,class,store procedure,view,triggers,call email class in asp.net c#,MVC AND ENTITY FRAMEWORK TUTORIAL,how to create database with script using c#,datareader with sqlhelper and run time label bind in grid,insert update select storprocedure Delete duplicate record in database,Delete duplicate record in database,how add connection string,how add connection string
Tuesday, 26 July 2011
cursor in sqlserver2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment