Sql Cursor
DECLARE @ProductID decimal
DECLARE @getProductID cursor
SET @getProductID = CURSOR FOR
SELECT AddTaxRate
FROM salesnew
OPEN @getProductID
FETCH NEXT
FROM @getProductID INTO @ProductID
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @ProductID
FETCH NEXT
FROM @getProductID INTO @ProductID
END
CLOSE @getProductID
No comments:
Post a Comment