题目 1.查找最晚入职员工的所有信息CREATE TABLE `employees` (`emp_no` int(11) NOT NULL,`birth_date` date NOT NULL,`first_name` varchar(14) NOT NULL,`last_name` varchar ...
分类:
数据库 时间:
2017-08-26 23:34:03
阅读次数:
370
1、首先创建两个bean类,Employee(职工)和Department(部门),一个部门可以有多个职工 Employee类(属性:职工ID:id;姓名:lastName;邮箱:email;性别:gender;所属部门:department) 1 package com.bwlu.bean; 2 ...
分类:
编程语言 时间:
2017-08-23 13:48:38
阅读次数:
213
排序:order by SQL> select last_name, salary from employees order by salary; 默认升序 SQL> select last_name, salary from employees order by salary desc; 降序 S ...
分类:
数据库 时间:
2017-08-19 11:08:40
阅读次数:
181
集合操作 当列的数量和列的数值类型,要完全一致, 不能确定的时候,要用null和数值类型函数来确定 select employee_id, job_id from employees union all select employee_id, job_id from job_history; sel ...
分类:
其他好文 时间:
2017-08-19 10:53:15
阅读次数:
166
有员工的部门名称; SQL> select department_name from departments where department_id in(select department_id from employees where department_id is not null); (i ...
分类:
其他好文 时间:
2017-08-19 10:47:32
阅读次数:
173
查找所有员工自入职以来的薪水涨幅情况,给出员工编号emp_noy以及其对应的薪水涨幅growth,并按照growth进行升序CREATE TABLE `employees` (`emp_no` int(11) NOT NULL,`birth_date` date NOT NULL,`first_na ...
分类:
数据库 时间:
2017-08-17 21:25:46
阅读次数:
207
数据库A访问远程数据库B上面的表: 在数据库A中,使用netca创建主机描述字符串orcl_dblink指向数据库B $ netca 第三项 数据库 主机地址 字符串名 $ tnsping orcl_dblink 在数据库A中创建数据库链接: SQL> create database link or ...
分类:
数据库 时间:
2017-08-15 21:12:45
阅读次数:
224
检查是否开启审计功能(参数): SQL> show parameter audit_trail 关闭审计功能: SQL> alter system set audit_trail=FALSE scope=spfile;System altered. 审计类型: 1.审计系统权限: 例: SQL> A ...
分类:
其他好文 时间:
2017-08-13 16:14:26
阅读次数:
185
lsnrctl status:查看监听状态 Oracle网络配置三部分组成:客户端,监听,数据库 配置文件:$ vi $ORACLE_HOME/network/admin/listener.ora vi listener.ora 和上面这个命令一样 netstat -tln|grep 1521 通过 ...
分类:
数据库 时间:
2017-08-09 20:05:49
阅读次数:
303
启动实例: $ ls $ORACLE_HOME/dbs/spfileorcl.ora Strings ORACLE_HOME/dbs/spfileorcl.ora SQL> shutdown immediate SQL> startup nomount SQL> select status from ...
分类:
数据库 时间:
2017-08-06 17:06:58
阅读次数:
190