Help shape GoConqr. What should we add next?

Mind map

CURSORES

kenett100 Spanish

CURSORES

Map content

CURSORES

  1. el cursor permitirá recorrer fila a fila, leer y eventualmente modificar dicho conjunto de resultados.

  2. DECLARACIÓN

    • se indica (junto con el nombre del cursor) la consulta que el mismo representará y algunas otras características bastante interesantes
    • Donde ProdInfo representará al nombre del cursor y la sentencia “SELECT ProductNumber,Name FROM Production.Product” será el conjunto de datos del mismo.
    • DECLARE ProdInfo CURSOR FOR SELECT Name FROM Production.Product
  3. RECORRIDO DEL CURSOR Y ACCESO A LOS DATOS

    • la instrucción FETCH permitirá efectuar dicha operación. Las filas leídas podrán copiarse a variables utilizando la sentencia INTO
    • FETCH NEXT FROM ProdInfo INTO @Description
    • la sentencia FETCH leerá un registro
  4. CIERRE DEL CURSOR

    • Una vez que el cursor es cerrado ya no podrá recorrerse el conjunto de resultados hasta que el mismo sea reabierto
    • CLOSE ProdInfo
  5. DESALOJO DEL CURSOR

    • Este paso eliminará la referencia al cursor definido previamente, por lo que ya no será posible realizar una reapertura del mismo
    • DEALLOCATE ProdInfo
  6. EJEMPLO DE CURSOR

Images and files in the map

  • CURSORES

Information

Description
Mind Map on CURSORES, created by kenett100 on 24/11/2015.
Created by
kenett100
Views
0
Rating

More on Cursores en bases de datos

Feedback

What is it about?

What should we add next?