给定以下 Python 代码,连接到一个 SQLite 数据库并查询表 students。请问,查询结果中包含多少个学生?( )
import sqlite3
conn = sqlite3.connect(":memory:")
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE students (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
score INTEGER NOT NULL
);
""")
cursor.execute("INSERT INTO students (name, score) VALUES ('小明', 90)")
cursor.execute("INSERT INTO students (name, score) VALUES ('小芳', 85)")
cursor.execute("INSERT INTO students (name, score) VALUES ('轩轩', 92)")
cursor.execute("INSERT INTO students (name, score) VALUES ('乐乐', 88)")
conn.commit()
cursor.execute("SELECT * FROM students WHERE score >= 90")
result = cursor.fetchall()
conn.close()
print(result)
0
1
2
3