以下哪个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()