rownumber
This page is part of MariaDB's Enterprise Documentation.
The parent of this page is: Connector/Python API
Topics on this page:
Overview
- In 1.1:
Not present
- In 1.0:
Provides the current row number in the result-set. (read-only)
See also: MariaDB Connector/Python 1.1 and in 1.0
EXAMPLES
import mariadb
conn = mariadb.connect(
host = 'localhost',
user = 'root',
password = 'secret',
database = 'test',
)
cursor = conn.cursor()
cursor.execute("SELECT * FROM sample")
for row in cursor:
print(cursor.rownumber, row)
CHANGE HISTORY
Release Series | History |
---|---|
1.1 |
|
1.0 |
|