摘要: ORACLE 测试一、完成下列SQL语句1.查询员工姓名(last_name或first_name),hire_date , department_id 满足以下条件:雇用时间在1997年之后,department_id 为80 或 90 或110, commission_pct不为空select... 阅读全文
posted @ 2015-05-16 20:04 领导来根辣条 阅读(399) 评论(0) 推荐(0) 编辑
摘要: synonye 同义词为employees表起别名SQL> create synonym e for employees;Synonym createdSQL> select * from e; 阅读全文
posted @ 2015-05-16 18:07 领导来根辣条 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 创建索引SQL> create index emp_name_index on emp2(name);Index created 以下情况可以创建索引:列中数据值分布范围很广列经常在 WHERE 子句或连接条件中出现表经常被访问而且数据量很大 ,访问的数据大概占数据总量的2%到4%下列情况不要创建... 阅读全文
posted @ 2015-05-16 17:57 领导来根辣条 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 序列create sequence FIXED_ASSETS_TYPE_SEminvalue 1maxvalue 9999999999999999999999999999start with 1increment by 1nocache; 触发器create or replace trigger ... 阅读全文
posted @ 2015-05-16 17:43 领导来根辣条 阅读(257) 评论(0) 推荐(0) 编辑
摘要: --创建表create table emp2 as select employee_id id,last_name name from employees where 1=2; 创建序列create sequence emp_seq; --查看当前序列的值select emp_seq.currva... 阅读全文
posted @ 2015-05-16 17:41 领导来根辣条 阅读(168) 评论(0) 推荐(0) 编辑
摘要: --创建视图SQL>create or replace view emp_viewasselect employee_id id,last_name name,email,department_name,cityfrom employees e,departments d,locations lwh... 阅读全文
posted @ 2015-05-16 16:40 领导来根辣条 阅读(756) 评论(0) 推荐(0) 编辑
摘要: sqlplus / as sysdba grant create any index to scott 授予创建任何索引grant create procedure to scott 授予创建储存过程grant create sequence to scott 授予创建序列grant create ... 阅读全文
posted @ 2015-05-16 13:58 领导来根辣条 阅读(206) 评论(0) 推荐(0) 编辑