摘要: /*************************************************************************************************/ 40. 谁的工资比 Abel 高? 1). 写两条 SQL 语句. SELECT salary FR 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(35) 评论(0) 推荐(0)
摘要: 1. 查询和Zlotkey相同部门的员工姓名和雇用日期 a) select last_name,hire_date b) from employees c) where department_id = ( d) select department_id e) from employees f) wh 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(84) 评论(0) 推荐(0)
摘要: 51. 利用子查询创建表 myemp, 该表中包含 employees 表的 employee_id(id), last_name(name), salary(sal), email 字段 1). 创建表的同时复制 employees 对应的记录 create table myemp as sele 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(58) 评论(0) 推荐(0)
摘要: --创建表 create table emp3 as select employee_id,last_name,hire_date,salary from employees --查询表 select * from emp3 --插入表 insert into emp3 values(1001,'A 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(35) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(23) 评论(0) 推荐(0)
摘要: 55. 更改 108 员工的信息: 使其工资变为所在部门中的最高工资, job 变为公司中平均工资最低的 job 1). 搭建骨架 update employees set salary = ( ), job_id = ( ) where employee_id = 108; 2). 所在部门中的最 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(25) 评论(0) 推荐(0)
摘要: --创建表 create table emp4( id number(10) constraint emp2_id_nn not null, name varchar2(20) not null, salaty number(10,2) ) --查询表 select *from emp4 --插入 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(32) 评论(0) 推荐(0)
摘要: --修改约束 alter table emp5 modify (salary number(10,2) not null) --修改约束 alter table emp5 modify (salary number(10,2) not null) --删除约束 alter table emp5 dr 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(21) 评论(0) 推荐(0)
摘要: 62. 查询员工表中 salary 前 10 的员工信息. select last_name, salary from (select last_name, salary from employees order by salary desc) where rownum <= 10 说明: rown 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(73) 评论(0) 推荐(0)
摘要: --创建序列 create sequence empseq increment by 10 每次增长10 start with 10--从10开始 maxvalue 100--提供最大值 cycle --循环 nocache --不需要缓存登录 --创建表 create table emp11 as 阅读全文
posted @ 2022-08-13 21:30 前端导师歌谣 阅读(23) 评论(0) 推荐(0)