oracle 学习笔记1
建立临时表结构
create global temporary table myemp as select * from emp;
修改表结构
alter table dept modify (Dname char(20));
alter table dept add (headcount number(3));
复制一个表
create table emp3 as select * from emp;
参照某个已存在的表建立一个表结构,不需要数据
create table emp4 as select * from emp where rownum<1;
修改已存在表存储参数
alter table emp2 storage(next 256K pctincrease 0);
删除表中的列:
alter table emp drop column comm;
重新定位和组织表
alter table emp move tablespace users;
将表标识为不可用
alter table emp set unused column xyz;
使用check作限制约束,check可以实现对数据的自动检查
create table worker
( empno number(4) primary key,
name varchar2(10),
age number(2) check (age between 18 and 65),
sex char(2) check (sex ='男' or sex = ‘女’)
);
相关文档:
red hat linux 下安装 oracle 10g
racle考资料:
Oracle官方网站: http://download.oracle.com/docs/html/B10813_01/toc.htm
一、以root用户登录, 进行如下操作:
1 检查硬件要求
* 主要包括:
********************************************************************
* 内存: & ......
Temporary Tables临时表
1简介
ORACLE数据库除了可以保存永久表外,还可以建立临时表temporary tables。这些临时表用来保存一个会话SESSION的数据,
或者保存在一个事务中需要的数据。当会话退出或者用户提交commit和回滚rollback事务的时候,临时表的数据自动清空,
但是临时� ......
2010年05月2号 |
23:59分类:Linux&Unix
, 管理维护
| 编辑
| 标签:11g
、grid
本文出自 “inthirties(男
人三十)
”博客,转载请务必注明作者和保留出处。
11g里出现了一个新角色。
Oracle Grid Infrastructure
http://downlo ......
现在的项目比较紧,加上自己也比较懒,实在是“没时间”写啊,呵呵,昨天看到一篇挺好的Oracle存储过程的例子,正好最近要用,转过来大家一起分享一下,谢谢(晨光映霞),原作地址:http://blog.csdn.net/xuyabao/archive/2008/03/20/2200205.aspx。
--------------------自定义函数开始--------------------
......
一、查询某个字段重复
select *
from User u
where u.user_name in (select u.user_name
&nbs ......