项目数据分析师理论考试

多选题如下表student中,如何筛选type为包含数学或语文的记录?()  ID type score: A01数学78; A02语文76; A03英语90; A04数学68; A05英语84。Aselect*from student where type=”数学”and type=”语文”Bselect*from student where type=”数学”or type=”语文”Cselect*from student where type in(”数学”,”语文”)Dselect*from st

题目
多选题
如下表student中,如何筛选type为包含数学或语文的记录?()  ID type score: A01数学78; A02语文76; A03英语90; A04数学68; A05英语84。
A

select*from student where type=”数学”and type=”语文”

B

select*from student where type=”数学”or type=”语文”

C

select*from student where type in(”数学”,”语文”)

D

select*from student where type in(”数学”、”语文”)

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

有如下的记录类型

Type student

id As String

name As String

age As Integer

End Type

则正确引用该记录类型变量的代码是( )

A.student.name=”Sias”

B.Dim s As student

s.mane=”Sias”

C.Dim s As type student

s.name=”Sias”

D.Dim s As type

s.name=”Sias”


正确答案:B

第2题:

要在 “ 成绩 ” 表中插入一条记录 , 应该使用的 SQL 语句是:【 14 】 成绩 ( 学号 , 英语 , 数学 , 语文 ) V A L UES ( " 2001100111 " ,9l,78,86)


正确答案:

第3题:

( 35 )如下程序段定义了学生成绩的记录类型,由学号、姓名和三门课程成绩(百分制)组成。

Type Stud

no As Integer

name As String

score ( 1 to 3 ) As Single

End Type

若对某个学生的各个数据项进行赋值,下列程序段中正确的是

A ) Dim S As Stud

Stud.no = 1001

Stud.name = ” 舒宜,,

Stud.score = 78,88,96

B ) Dim S As Stud

S.no = 1001

S.name 二 ” 舒宜,,

S.score 二 78,88,96 \

C ) Dim S As Stud

Stud.no = 1001

Stud.name = ” 舒宜,,

Stud.score ( 1 )= 78

Stud.score ( 2 )= 88

Stud.score ( 3 )= 96

D ) Dim S As Stud

S.no = 1001

S.name = ” 舒宜,,

S.score ( 1 )= 78

S.score ( 2 )= 88

S.score ( 3 )= 96


正确答案:D

第4题:

要建立一个随机文件记录学生的信息,如下定义了学生的记录类型,由学号、姓名、5门课程成绩(百分制)组成,下列的定义正确的是( )。

A.Type sru no As Integer name As String score(1 To 5)As Single End Type

B.Type stu no As Integer name As String*10 score()As Single End Type

C.Type stu no As Integer name As String*10 score(1 To 5)As Single End Type

D.Type stu no As Integer name As String score()As Single End Type


正确答案:C
解析:可以用Type语句创建用户定义的类型,注意该语句必须置于模块的声明部分。其格式如下:
  Type数据类型名
  数据类型元素名 As类型名
  数据类型元素名 As类型名
  End Type
  在记录数据类型中的元素可以是变长字符串,也可以是定长字符串。当在随机文件中使用时,必须使用定长字符串,一般格式是:String *常量。另外,在记录类型中不能使用动态数组。

第5题:

(12)要建立一个随机文件记录学生的信息,下列定义了学生的记录类型,由学号、姓名、五门课程成绩(百分制)组成,下列的定义正确的是。A.Type stu no As Integer name As String score(1 To 5)As Single End Type B.Type stuno As Integename As String*10score()As SingleEnd TypeC.Type stu no As Integer name As String*10 score(1 To 5)As Single End Type D.Type stuno As Integername As Stringscore()As SingleEnd Type


正确答案:C
【解析】可以用升详语句创建用户定义的类型,注意该语句必须置于模块的声明部分。其格式如下:
  Type 数据类型名
  数据类型元素名 As 类型名
  数据类型元素名 As 类型名
  ……
  End Type
在记录数据类型中的元素可以是变长字符串,也可以是定长字符串。当在随机文件中使用时,必须使用定长字符串,一般格式是:String*常量。另外,在记录类型中不能使用动态数组。

第6题:

如下程序段定义了学生成绩的记录类型,由学号、姓名、三门课程成绩(百分制)组成。 Type Stud no As Integer name As String*10 score(1 To 3) As Single End Type 若对某个学生的各数据项进行赋值,下列程序段正确的是( )。

A.Dim S As Stud Stud.no=0201 Stud.name="李平" Stud.score=78,88,96

B.Dim S As Stud S.no=0201 S.name="李平" S.score=78,88,96

C.Dim S As Stud S.no=0201 S.name="李平" S.score(1)=78 S.score(2)=88 S.score(3)=96

D.Dim S As Stud Stud.no=0201 Stud.name="李平" Stud.score(1)=78 Stud.score(2)=88 Stud.score(3)=96


正确答案:C

第7题:

设有如下的用户定义类型: Type Student number As String name As string age As Integer End Type 则以下正确引用该类型成员的代码是______。

A. Student name="李明”

B.Dim s As Student s.name="李明"

C.Dim s As Type Student s.name="李明"

D.Dim s As Type s.name="李明"


正确答案:B
解析:题目中所给出的是用户自定义类型,在这里注意新类型的名称是Student,所以选项CD均不正确;对于类型成员的引用是:对象,属性(方法),所以选项A不正确。

第8题:

假设有如下的记录类型: Type Student number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是______。

A.Student. name="" s. name="张红"

B.Dim s As Student s. Dame="张红"

C.Dim s As Type Student s. name="张红"

D.Dim s As Type s. name="张红"


正确答案:B
解析:记录类型变量的定义与基本数据类型变量的定义没有什么区别,但在引用时有所不同。正确的引用方法是:用Type…End Type定义了一个用户定义的数据类型Student,再用Integer定义student类型的变量s,然后就可以用“变量. 元素”的格式引用记录中的各个成员。例如,s. number、s. name、s. age。

第9题:

设有如下的记录类型: TypeStudent number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是( )。

A.Student.name="张红"

B.Dim s As Student s.name="张红"

C.Dim s As Type Student s.name="张红"

D.Dim s As Type s.name="张红"


正确答案:B

第10题:

下列数据类型定义中,正确的是

A.Type Student Num As Long Name As String End Type

B.Type Student Num As Integer Name As String * 10 End Type

C.Private Type Num As Long Score As Single End Type

D.Private Type Student Name As String Score(10)As String * 10 End Type


正确答案:B
解析:自定义类型的一般格式为:
  Type数据类型名>
  成员名> As 类型名
  ……
  End Type
  根据自定义类型的格式可以排除C、D两项。成员名如果是字符串类型时,一般要指明字符串长度。排除选项A,只有B项是正确的。

更多相关问题