摘要: 启动实例: $ ls $ORACLE_HOME/dbs/spfileorcl.ora Strings ORACLE_HOME/dbs/spfileorcl.ora SQL> shutdown immediate SQL> startup nomount SQL> select status from 阅读全文
posted @ 2017-08-06 15:52 夜月色下 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 监听 启动监听: $ netstat -tlnp | grep 1521 $ lsnrctl LSNRCTL> help $ lsnrctl status $ lsnrctl stop $ netstat -tln | grep 1521 快速动态注册:(可选) $ sqlplus / as sys 阅读全文
posted @ 2017-08-06 15:51 夜月色下 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 体系结构 SGA: $ sqlplus / as sysdba SQL> show sga SQL> show parameter sga_max_size 显示sga容量 SQL> select * from V$SGAINFO; oem:浏览器中 服务器-->内存指导(https://192.1 阅读全文
posted @ 2017-08-06 15:50 夜月色下 阅读(113) 评论(0) 推荐(0) 编辑
摘要: DML insert: SQL> create table t1(x int, y char(1), z date); SQL> insert into t1(x, y, z) values (1, 'a', sysdate); SQL> insert into t1(x, z, y) values 阅读全文
posted @ 2017-08-06 15:48 夜月色下 阅读(241) 评论(0) 推荐(0) 编辑
摘要: select employee_id, job_id from employees union all select employee_id, job_id from job_history; select employee_id, job_id from employees union selec 阅读全文
posted @ 2017-08-06 15:46 夜月色下 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 单行子查询的思路: SQL> select salary from employees where last_name='Feeney'; SQL> select last_name from employees where salary>3000; SQL> select last_name fr 阅读全文
posted @ 2017-08-06 15:45 夜月色下 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 内连接:106(106, 11) select e.last_name, d.department_name from employees e, departments d where e.department_id=d.department_id; select e.last_name, d.de 阅读全文
posted @ 2017-08-06 15:44 夜月色下 阅读(90) 评论(0) 推荐(0) 编辑
摘要: SQL> select count(*), sum(salary), avg(salary), min(salary), max(salary) from employees; SQL> create table t1(x int); SQL> insert into t1 values (null 阅读全文
posted @ 2017-08-06 15:43 夜月色下 阅读(91) 评论(0) 推荐(0) 编辑
摘要: SQL> select to_char(salary, '$999,999.00') from employees; SQL> select last_name, to_char(hire_date, 'dd-Mon-RR') from employees; SQL> select to_char( 阅读全文
posted @ 2017-08-06 14:47 夜月色下 阅读(110) 评论(0) 推荐(0) 编辑
摘要: SQL> select upper(first_name), lower(last_name), length(last_name) from employees; SQL> select (sysdate-hire_date)/7 from employees; SQL> select trunc 阅读全文
posted @ 2017-08-06 14:46 夜月色下 阅读(166) 评论(0) 推荐(0) 编辑