单选题

有如下Python代码:

import sqlite3
conn = sqlite3.connect('cj.db')
cursor = conn.cursor()
cursor.execute('SELECT * FROM student')
rows = cursor.fetchmany(5)
for row in rows:
    print(row)
cursor.close()
conn.close()

已知查询的数据表中的数据超过5行,则执行程序后,下列说法正确的是?( )

A

链接的数据库文件是student

B

查询的数据表名称是select

C

若只想获取一条查询数据,可以将fetchmany()换成fetchall()

D

print(len(rows))得到的结果是5

赣ICP备20007335号-2