oracle 查询测试样题
1.select count(*) from employees where last_name like _A%;key:02.select count(*)from employeeswhere to_char(hire_date,YYYY)=1998;select count(*)from employeeswhere hire_date like %98;key:23select to_char(hire_date,YYYY) from employees;3.se
1. select count(*) from employees where last_name like '_A%'; key:0 2. select count(*) from employees where to_char(hire_date,'YYYY')=1998; select count(*) from employees where hire_date like '%98'; key:23 select to_char(hire_date,'YYYY') from employees; 3. select job_title, max_salary-min_salary as "SAL_DIEF" from jobs order by max_salary-min_salary desc; select job_title,(max_salary-min_salary) as "SAL_DIEF" from jobs order by 2 desc; 19行记录 4. select count(*) from employees where (salary>12000 or salary12000; --当它判断1000为假时就不判断后面的大于12000了. select job_id from employees; select * from employees where job_id in('ST_MAN','SH_CLERK'); --工作岗位名称要加单引号 5. select count(*) from employees where to_char(hire_date,'YYYY')=1999 and to_char(hire_date,'mm')=02; key:3 select count(*) from employees where to_char(hire_date,'YYYY-MM')='1999-02'; 6. select last_name,salary, decode(trunc(salary/1500),0,'A', 1,'B', 2,'C', 'D' ) Grade from employees where last_name like'%s'; 7. select d.department_id,d.department_name,l.city from departments d,locations l where d.department_id in(10,40,90) and d.location_id=l.location_id; 8. select l.city,c.country_name,r.region_name from locations l,regions r,countries c where l.location_id=1000 and l.country_id=c.country_id and c.region_id=r.region_id; 9. select m.last_name "MAN_NAME",nvl(e.last_name,'NO EMPLOYEES') "EMP_NAME" from employees m,employees e where m.department_id=100 and m.employee_id=e.manager_id(+); 10行记录 select m.last_name MAN_NAME,nvl(e.last_name,'NO EMPLOYEES') EMP_NAME from employees m,employees e where m.department_id=100 and m.employee_id=e.manager_id(+); 10 select department_id,count(*) NUM from employees where salary>8000 group by department_id ; 9行记录 11 select department_id,count(*) NUM from employees where salary>5000 group by department_id having count(*)>3; 3行记录 12 select last_name,salary from employees where salary> (select salary from employees where employee_id=110) and department_id=100; 2行记录 13 select count(*) NUM from employees where commission_pct<all distinct commission_pct from employees where salary>12000 and commission_pct is not null ); 24行记录 </all>

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

Oracle 打不开的解决办法包括:1. 启动数据库服务;2. 启动监听器;3. 检查端口冲突;4. 正确设置环境变量;5. 确保防火墙或防病毒软件未阻止连接;6. 检查服务器是否已关闭;7. 使用 RMAN 恢复损坏的文件;8. 检查 TNS 服务名称是否正确;9. 检查网络连接;10. 重新安装 Oracle 软件。

解决 Oracle 游标关闭问题的方法包括:使用 CLOSE 语句显式关闭游标。在 FOR UPDATE 子句中声明游标,使其在作用域结束后自动关闭。在 USING 子句中声明游标,使其在关联的 PL/SQL 变量关闭时自动关闭。使用异常处理确保在任何异常情况下关闭游标。使用连接池自动关闭游标。禁用自动提交,延迟游标关闭。

Oracle 中,FOR LOOP 循环可动态创建游标, 步骤为:1. 定义游标类型;2. 创建循环;3. 动态创建游标;4. 执行游标;5. 关闭游标。示例:可循环创建游标,显示前 10 名员工姓名和工资。

可以通过 EXP 实用程序导出 Oracle 视图:登录 Oracle 数据库。启动 EXP 实用程序,指定视图名称和导出目录。输入导出参数,包括目标模式、文件格式和表空间。开始导出。使用 impdp 实用程序验证导出。

Oracle 日志文件写满时,可采用以下解决方案:1)清理旧日志文件;2)增加日志文件大小;3)增加日志文件组;4)设置自动日志管理;5)重新初始化数据库。在实施任何解决方案前,建议备份数据库以防数据丢失。

Oracle不仅是数据库公司,还是云计算和ERP系统的领导者。1.Oracle提供从数据库到云服务和ERP系统的全面解决方案。2.OracleCloud挑战AWS和Azure,提供IaaS、PaaS和SaaS服务。3.Oracle的ERP系统如E-BusinessSuite和FusionApplications帮助企业优化运营。

在CentOS系统上搭建Hadoop分布式文件系统(HDFS)需要多个步骤,本文提供一个简要的配置指南。一、前期准备安装JDK:在所有节点上安装JavaDevelopmentKit(JDK),版本需与Hadoop兼容。可从Oracle官网下载安装包。环境变量配置:编辑/etc/profile文件,设置Java和Hadoop的环境变量,使系统能够找到JDK和Hadoop的安装路径。二、安全配置:SSH免密登录生成SSH密钥:在每个节点上使用ssh-keygen命令

要停止 Oracle 数据库,请执行以下步骤:1. 连接到数据库;2. 优雅关机数据库(shutdown immediate);3. 完全关机数据库(shutdown abort)。
