Board logo

标题: 游标编程套路 [打印本页]

作者: ljw9128    时间: 2006-12-13 09:09     标题: 游标编程套路

String ls_temp1
String ls_temp2
declare cur_name CURSOR FOR
select field1,field2 from tablename
where condition
OPEN cur_name;
FETCH cur_name INTO :ls_temp1,:ls_temp2;
do while sqlca.sqlcode = 0
  //其它处理语句,尽量不要包含SQL语句。如果要包含,一定要在fetch语句之前。
FETCH cur_dis INTO :ls_temp1,:ls_temp2;
loop
close cur_name;
转载 文章来自http://www.study01job.com/pb
作者: zhouln2008    时间: 2007-9-17 09:51

顶了!!!!!!!!!!!!!!!!!!!!!




欢迎光临 编程开发论坛 (http://bbs.lihuasoft.net/) Powered by Discuz! 6.0.0