/*
游标:可以用来存放查询结果,逐行提取查询结果,以编程的方式访问数据
类型:1.隐式游标;2.显示游标;3.引用游标
*/
/*
在PL/SQL中使用DML语句时自动创建隐式游标
隐式游标自动声明、打开和关闭,其名为 SQL
通过检查隐式游标的属性可以获得最近执行的DML语句的信息
隐式游标的属性有:
1.%FOUND – SQL语句影响了一行或多行时为 TRUE
2.%NOTFOUND – SQL语句没有影响任何行时为TRUE
3.%ROWCOUNT – SQL语句影响的行数
4.%ISO...
分类:
数据库 时间:
2014-05-13 23:56:53
阅读次数:
522
//需求:由于项目刚上传,没有票数,为了表现出一定的人气,需要在一开始把各项目的票数赋一个值 ,
但每个项目不能一样,否则容易看出问题,呵呵 。
DECLARE @Id varchar(50)
DECLARE My_Cursor CURSOR --定义游标
FOR (SELECT Id FROM dbo.kinpanAwardProject where session=9) --查出...
分类:
数据库 时间:
2014-05-13 07:25:04
阅读次数:
405
学习ContentproviderUri的格式:“content://”+authority+“/表名”字符串转成Uri格式:Uri.parse();获取Cursor某一项的数据:Cursor先锁定某一行:如cursor.movetofirst();Cursor再根据列名锁定某一列,最后取出数据:cursor.getvaluesType(cursor.getcolumnindex(“列名”)..
分类:
其他好文 时间:
2014-05-13 01:51:36
阅读次数:
405
玩魔兽和LOL时注意到即时游戏窗口最小化,鼠标仍限制在窗口内,这具体是怎么实现的呢?Msdn上有个例子Confining a Cursor:RECT
rcClip; // new area for ClipCursorRECT rcOldClip; // previ...
分类:
其他好文 时间:
2014-05-12 20:25:11
阅读次数:
431
print"ID of last record is ",
int(cursor.lastrowid) #最后插入行的主键IDprint"ID of inserted record is ",
int(conn.insert_id()) #最新插入行的主键ID,conn.insert_id()一定要...
分类:
数据库 时间:
2014-05-12 13:02:44
阅读次数:
394
import MySQLdb# 打开数据库连接db =
MySQLdb.connect("localhost","testuser","test123","TESTDB" )# 使用cursor()方法获取操作游标
cursor = db.cursor() #cursor用来执行命令的方法:
分类:
数据库 时间:
2014-05-10 06:03:19
阅读次数:
309
Oracle will generate something called cursor
after it parse an statement. This thing--cursor will be stored in Library cache,
if next time you need to...
分类:
数据库 时间:
2014-05-10 01:02:22
阅读次数:
579
错误原因:
如API中所述
API:
A table of data representing a database result set, which is usually generated by executing a statement that queries the database. A
ResultSet object maintains a cursor pointi...
分类:
数据库 时间:
2014-05-09 21:00:43
阅读次数:
423
1.commit和rollback操作会让游标close掉,除非open的时候使用hold方式打开和使用游标2.close掉cursor之后不用freecursor,但是closeallcator之后要记得freeallocator
分类:
数据库 时间:
2014-05-09 14:27:04
阅读次数:
348
Fix invisible cursor issue in Ubuntu
13.10Fixing this problem is rather too easy. Open a terminal (Ctrl+Alt+T) and
use the following command:gsettings...
分类:
其他好文 时间:
2014-05-09 07:57:17
阅读次数:
311