viernes, 26 de junio de 2009

Declaración de Cursores en SQL 2000

Esta es la sintaxis basica para declarar un cursor en SQL SERVER 2000

DECLARE authors_cursor CURSOR FOR
SELECT au_lname FROM authors
WHERE au_lname LIKE "B%"
ORDER BY au_lname

OPEN authors_cursor

-- Perform the first fetch.
FETCH NEXT FROM authors_cursor

-- Check @@FETCH_STATUS to see if there are any more rows to fetch.
WHILE @@FETCH_STATUS = 0
BEGIN
-- This is executed as long as the previous fetch succeeds.
FETCH NEXT FROM authors_cursor
END

CLOSE authors_cursor
DEALLOCATE authors_cursor
GO

1 comentario:

  1. Betting On Baccarat - The Best Sites To Bet On
    Learn how to win with online baccarat, the best online casino to play baccarat, casino games 바카라사이트 and other gambling games with no 메리트 카지노 쿠폰 deposit 바카라 required!

    ResponderEliminar

 
Locations of visitors to this page