第14762题 单选题
以下哪个Python代码片段正确执行SQL查询并获取所有结果?
A
cursor.execute("SELECT * FROM students")
results = cursor.scroll()
B
cursor.execute("SELECT * FROM students")
results = cursor.fetchall()
C
results = cursor.execute("SELECT * FROM students").fetchone(
D
cursor.begin("SELECT * FROM students")
results = cursor.fetchmany()
程序运行统计
暂无判题统计