ORACLE-笔试题及答案.docxVIP

  • 0
  • 0
  • 约6.91千字
  • 约 9页
  • 2026-01-09 发布于河南
  • 举报

ORACLE-笔试题及答案

姓名:__________考号:__________

一、单选题(共10题)

1.什么是SQL语言的核心功能?()

A.数据库设计

B.数据查询

C.数据库维护

D.数据库备份

2.在Oracle中,如何删除一个不存在的表?()

A.DROPTABLE表名

B.DELETEFROM表名

C.TRUNCATETABLE表名

D.ALTERTABLE表名DROPCOLUMN列名

3.在Oracle中,如何创建一个名为students的表,包含id(主键)、name和age三个字段?()

A.CREATETABLEstudents(idINTPRIMARYKEY,nameVARCHAR2(100),ageINT)

B.CREATETABLEstudents(idINT,nameVARCHAR2(100),ageINTPRIMARYKEY)

C.CREATETABLEstudents(idINT,nameVARCHAR2(100),ageINT)

D.CREATETABLEstudents(idINT,nameVARCHAR2(100),ageINTPRIMARYKEY,idINTPRIMARYKEY)

4.在Oracle中,如何将一个名为students的表的age字段修改为int类型?()

A.ALTERTABLEstudentsMODIFYageINT

B.ALTERTABLEstudentsMODIFYageINTEGER

C.ALTERTABLEstudentsCHANGEageageINT

D.ALTERTABLEstudentsMODIFYageNUMBER

5.在Oracle中,如何创建一个名为students的视图,该视图包含students表的id和name字段?()

A.CREATEVIEWstudentsASSELECTid,nameFROMstudents

B.CREATEVIEWstudentsASSELECTid,nameFROMstudentsWHEREidISNOTNULL

C.CREATEVIEWstudentsASSELECTid,nameFROMstudentsWHEREnameISNOTNULL

D.CREATEVIEWstudentsASSELECTid,nameFROMstudentsORDERBYid

6.在Oracle中,如何查询students表中年龄大于20岁的学生?()

A.SELECT*FROMstudentsWHEREage20

B.SELECT*FROMstudentsWHEREage=20

C.SELECT*FROMstudentsWHEREage20

D.SELECT*FROMstudentsWHEREage=20

7.在Oracle中,如何将students表中的所有数据清空?()

A.DELETEFROMstudents

B.TRUNCATETABLEstudents

C.DROPTABLEstudents

D.ALTERTABLEstudentsDROPCOLUMN*

8.在Oracle中,如何将students表中的id字段设置为自增主键?()

A.ALTERTABLEstudentsMODIFYidINTAUTO_INCREMENT

B.ALTERTABLEstudentsADDCONSTRAINTpk_studentsPRIMARYKEY(id)

C.ALTERTABLEstudentsMODIFYidINTPRIMARYKEY

D.ALTERTABLEstudentsADDidINTPRIMARYKEY

9.在Oracle中,如何创建一个名为students的索引,用于加速对name字段的查询?()

A.CREATEINDEXidx_students_nameONstudents(name)

B.CREATEINDEXidx_students_nameONstudents(nameDESC)

C.CREATEINDEXidx_students_nameONstudents(nameASC

文档评论(0)

1亿VIP精品文档

相关文档