Fetch is a SQlite function, it writes in fetch( ). The purpose of this function is to
Return a result record of the query
For example:for row in cur.fetchall( ):
- fetchall( ) - return all as a tuple
print "name",row[0], "address",row[1]
2. fetchone( ) - return first row
for row in cur.fetchone( ):
print "............................
3. fetchmany( size) - return row according to size
for row in cur.fetchmany(200)
print "%s | %s |%s" %row
No comments:
Post a Comment