单选题
适中
#4864
执行数据库操作的部分代码如下: import sqlite3 db = sqlite3.connect("test.db") cur=db.cursor() c…
执行数据库操作的部分代码如下:
import sqlite3
db = sqlite3.connect("test.db")
cur=db.cursor()
cur.execute("create table Student(Sname char(20),Sage SMALLINT);")
db.close()下列描述正确的是?( )
答案与解析
正确答案:D
解析
当前操作的数据库的名称为“test.db”,create table语句的功能用于创建数据表,数据表中包含Sname和Sage两个字段。