python的pyodbc库连接sybase数据库,update语句中,有返回值,怎么获取?
为了获取一个sessionid,保证唯一性,时间戳+六位序列号,六位序列号想通过在数据库中自增的方式获取,想通过update语句,一次性获取出来,是否可以这样做?现在一直调试不出来,看看大家有没有好的办法
update的语句是:
aa = pyodbc.interger
sql = "update s9901identity set %d= idvalue ,idvalue = idvalue + @v_step where upper(tablename) = upper(test)" %
python代码:
self._cursor.execute(sql )
self._conn.commit()
通过fetchall一直报错