2024年专题数据库笔试模拟.pdfVIP

  • 0
  • 0
  • 约7.2千字
  • 约 13页
  • 2026-02-12 发布于河北
  • 举报

令(CORE-E-001)综合练习

■定义

CORE-F-001—CORE-F-005的综合练习:

1.用sqlplus连接数据库时,为何会出Oraclenotavailable错误?

OracleSID

2.找出员工的姓中(last_nae)三个字母是a的员工名字

Selectnae

froep

Wherelast_naelike_a%;

3.找出员工名字中含有a和e的员工信息.

Select*

Froep

Wherenaelike%a%e%

Ornaelike;

4.找出所有有提成的员工,列知名字、工资、提成,显示成果按工资从小到大,提成从

小到大的次序

selectfirst_name,salary,commission_pctfroms_ernpwherecommission_pctisnot

nullorderbysalary,commission_pct;

Select*froep

Wherebonusisnotnull

Orderbysalary,bonus;

5.42部门有哪些职位

Selectdistinctjob

Froep

Wheredept_no=42;

6.除了Sales部门,尚有哪些部门,列出部门号、部门名称。

Selectdeptno^dnae

Frodept

WherednaeSales;

7.显示工资不在1000到1550之间的员工信息:名字、工资,按工资从大到小排序,

Selectnae^salary

Froep

Wheresalarynotbetween1000and1550

Andsalaryisnotnull

Orderbysalarydesc;

8.显示职位为StockClerk和SalesRepresentative,年薪在14400和17400之间的

员工的信息:名字、职位、年薪。

Selectnae,job,salary*12nianxin

Froep

Wherejobin(StockClerk,SalesRepresentative)and

salarybetween1200and1450;

9.解释selectid,coission_pctfros_epwherecoission_pctisnull

和selectid,coission_pctfros_epwherecoission_pct=null

的输出成果。

isnull判断是否为空,=null判断某个值是否等于null,,null=null和nullnull

都为nullo

10.select语句的输出成果为

*

selectfros_dept;

*

selectfros_e叩;

*

selectfros_region;

selectfr、oms_custoer;

目前用户有多少张表,成果集有多少条统计。

selectselect*fromfromuser_tables;

11.判J断select-First_nae,dept_idfros_epwheresalary1450是否抱专昔,

为何?

隐式数据类型转换

Selects.sno,s.sname

FromStudents.Coursec.SC

3.整

文档评论(0)

1亿VIP精品文档

相关文档