资源描述:
《oracle plsql考试试卷》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、姓名:_______________________PersonalNumber:_________________班级:____________________OracleSQL&PL/SQLTest一、选择题(45*2)1.用下列代码块回答问题:SQL>select______(-45)asoutputfromdual;OUTPUT-------45下列哪个单行函数无法产生这个输出?A.abs()B.ceil()C.floor()D.round()2.用下列代码回答问题:EvaluatethesetofSQLstate
2、ments:CREATETABLEdept(deptnoNUMBER(2),dnameVARCNAR2(14),locVARCNAR2(13));ROLLBACK;DESCRIBEDEPTWhatistrueabouttheset?哪个语句是正确的?A.TheDESCRIBEDEPTstatementdisplaysthestructureoftheDEPTtable.B.TheROLLBACKstatementfreesthestoragespaceoccupiesbytheDEPTtable.C.TheDESCRIBE
3、DEPTstatementreturnsanerrorORA-04043:objectDEPTdoesnotexist.D.TheDESCRIBEDEPTstatementdisplaysthestructureoftheDEPTtableonlyifthereisaCOMMITstatementintroducedbeforetheROLLBACKstatement.3.用下列代码回答问题:ExaminethestructureoftheEMPLOYEESandDEPARTMENTStables:检查如下表结构EMPLO
4、YEESColumnnameDatatypeRemarksEMPLOYEE_IDNUMBERNOTNULL,PrimaryKeyEMP_NAMEVARCHAR2(30)JOB_IDVARCHAR2(20)SALARYNUMBERMGR_IDNUMBERReferencesEMPLOYEE_IDCOLUMNDEPARTMENTIDNUMBERForeignkeytoDEPARTMENTIDcolumnoftheDEPARTMENTStableDEPARTMENTS姓名:_______________________Perso
5、nalNumber:_________________班级:____________________ColumnnameDatatypeRemarksDEPARTMENT_IDNUMBERNOTNULL,PrimaryKeyDEPARTMENT_NAMEVARCHAR2(30)MGR_IDNUMBERReferencesMGR_IDcolumnoftheEMPLOYEEStableEvaluatethisSQLstatement:SELECTemployee_id,e.department_id,department_na
6、me,salaryFROMemployeese,departmentsdWHEREe.department_id=d.department_id;WhichSQLstatementisequivalenttotheaboveSQLstatement?一下哪个语句和上面的语句执行结果相同?A.SELECTemployee_id,department_id,department_name,salaryFROMemployeesWHEREdepartment_idIN(SELECTdepartment_idFROMdepartm
7、ents);B.SELECTemployee_id,department_id,department_name,salaryFROMemployeesNATURALJOINdepartments;C.SELECTemployee_id,d.department_id,department_name,salaryFROMemployeeseJOINdepartmentsdONe.department_id=d.department_id;D.SELECTemployee_id,department_id,department
8、_name,SalaryFROMemployeesJOINdepartmentsUSING(e.department_id,d.department_id);1.运行下列哪个查询时会产生错误?A.selectdeptno,job,sum(sal)fromempgroupbyjob,deptno;B.se