假设conn为数据库连接对象,下面哪条语句可向表TeacherInfo中添加变长字符串类型的Name列
A: seq="INSERTINTOTABLETeacherInfoADDNameVARCHAR(50)"conn.execute(seq)
B: seq="ALTERTABLETeacherInfoADDNameVARCHAR(50)"conn.execute(seq)
C: seq="ALTERTABLETeacherInfoADDNameVARCHAR(50)"conn.commit(seq)
D: seq="INSERTINTOTABLETeacherInfoADDNameVARCHAR(50)"conn.commit(seq)
A: seq="INSERTINTOTABLETeacherInfoADDNameVARCHAR(50)"conn.execute(seq)
B: seq="ALTERTABLETeacherInfoADDNameVARCHAR(50)"conn.execute(seq)
C: seq="ALTERTABLETeacherInfoADDNameVARCHAR(50)"conn.commit(seq)
D: seq="INSERTINTOTABLETeacherInfoADDNameVARCHAR(50)"conn.commit(seq)
举一反三
- 中国大学MOOC: 假设conn为数据库连接对象,下面哪条语句可向表TeacherInfo中添加变长字符串类型的Name列
- random.shuffle(seq)函数中,seq的类型不可能是 A: 字符串 B: 元组 C: 列表 D: 字典
- 用seq函数,生成向量X= (1,2,3,4,5,6,7,8,9,10)的命令是 A: X<-seq[1:10] B: X<-seq(1, by = 1, length.out = 1) C: X<-seq(1, by = 10, length.out = 1) D: X<-seq(1, by = 1, length.out = 10)
- 已知seq为长度大于10的列表,并且已导入random模块,那么[random.choice(seq)foriinrange(10)]和random.sample(seq,10)等价。
- A和B之间建立了TCP连接,A向B发送了一个报文段,其中序号字段seq=200,确认号字段ack=201,数据部分有2个字节,那么在B对该报文段的确认段中( ) A: seq=202, ack=200 B: seq=201, ack=201 C: seq=201, ack=202 D: seq=202, ack=201