#!/usr/bin/python # import MySQL module import MySQLdb # get user input name = raw_input("Please enter a name: ") # connect conn = MySQLdb.connect(host="localhost", user="nobody", passwd="nobody", conn="qestar&
When Oracle Database executes a SQL statement, it stores the result set and processing information in an unnamedprivate SQL area. A pointer to this unnamed area, called acursor, lets youretrieve the rows of the result set one at a time.Cursor attribu
一.使用游标 对于DML语句和单行select into ,oracle自动分配隐形游标.处理select返回多行语句,可以使用显式游标. 使用显示游标处理多行数据,也可使用SELECT..BULK COLLECT INTO 语句处理多行数据. 1.定义游标 cursor cursor_name is select_statement; 2.打开游标: 执行对应的SELECT语句并将SELECT语句的结果暂时存放到结果集中. open cursor_name; 3.提取数据 打开游标后,SELE