# 连接数据库
# ...
cursor = conn.cursor()
# 执行 SQL 查询
cursor.execute("""
SELECT
Language, Percentage
FROM countrylanguage
WHERE CountryCode = 'RUS'
ORDER BY Percentage DESC""")
# 获取第一行
first_row = cursor.fetchone()
print(first_row)
# 获取所有行
rows = cursor.fetchall()
for row in rows:
print(row)
# 关闭连接
conn.close()