选择题
已知学生表(学号,姓名,性别,生日),如下事件代码的功能是将学生表中“生日”字段为空值的学生“性别”字段值设置为“男”。
Private Sub Command0_Click()
Dim str As String
Setdb=CurrentDb()
str='______'
DoCmd.RunSQL str
End Sub
按照功能要求,在空白处应填写的是______。
A、
Update 学生表 Set 性别='男' Where 生日 Is Null
B、
Update 学生表 Set 性别='男' Where 生日=Null
C、
Set 学生表 Values 性别='男' Where 生日 Is Null
D、
Set 学生表 Values 性别='男' Where 生日=Null
【正确答案】
A
【答案解析】
更新数据应使用Update语句,判断字段是否为空应使用Is Null。
提交答案
关闭