Closed tcdejong closed 1 year ago
Just call .fetchall()
:
>>> crsr.execute("CREATE TABLE foo (id int primary key, txt nvarchar(50))")
<pyodbc.Cursor object at 0x0000001498FCBD30>
>>> st = crsr.statistics("foo")
>>> st
<pyodbc.Cursor object at 0x0000001498FCBD30>
>>> st.fetchall()
[('test', 'dbo', 'foo', None, None, None, 0, None, None, None, 0, 0, None), ('test', 'dbo', 'foo', 0, 'foo', 'PK__foo__3213E83F52719F64', 1, 1, 'id', 'A', 0, 0, None)]
Environment
Issue
The documentation for pyodbc.Cursor describes the
Cursor.statistics
method. However, return type is another Cursor. I'm not sure how to access the results, and there's no example in the documentation.How do I access the results from
.statistics
?