易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle 批量导入Sequence

 select 'create sequence '||sequence_name||  
       ' minvalue '||min_value||  
       ' maxvalue '||max_value||  
       ' start with '||last_number||  
       ' increment by '||increment_by||  
       (case when cache_size=0 then ' nocache' else ' cache '||cache_size end) ||';'  //这个是实时的Sequence
from user_sequences
select  d.text,d.name  from   user_source    d  where  type   ='PROCEDURE' ; //查询所有存储过程
SELECT DBMS_METADATA.GET_DDL(U.OBJECT_TYPE, u.object_name)
  from USER_OBJECTS u
 where U.OBJECT_TYPE IN ('TABLE','INDEX','PROCEDURE','sequence');//得到一个用户下的所有表,索引,存储过程,sequence .......的ddl


相关文档:

获取Oracle 表信息 整成数据字典

 今天XXX说要把Oracle 里的几张表重新整理下,呵呵 结果阿发现10来张表还真是说多不多说少一点都不少 。因为表里面的commet已经填上了 。偷懒的想法顿时出现嘎嘎
select t.COLUMN_NAME 字段名, t.DATA_TYPE||'('||t.DATA_LENGTH||')' 字段类型,t.NULLABLE 是否为空,t.DATA_DEFAULT 默认值,p.comments 字段说明
fro ......

ORACLE插入日期数据

 oracle数据库插入日期型数据
往Oracle数据库中插入日期型数据(to_date的用法)
INSERT  INTO  FLOOR  VALUES  ( to_date ( '2007-12-20 18:31:34' , 'YYYY-MM-DD HH24:MI:SS' ) ) ;
查询显示:2007-12-20 18:31:34.0
-------------------
INSERT  INTO  FLOOR  VALUES ......

oracle树结构查询

 
connect by 是结构化查询中用到的,其基本语法是:
select ... from tablename start with 条件1
connect by 条件2
where 条件3;
例:
select * from table
start with org_id = 'HBHqfWGWPy'
connect by prior org_id = parent_id;
 
简单说来是将一个树状结构存储在一张表里,比如一个表 ......

oracle cursor_sharing参数

先来看看官方文档中对这个参数的解释
CURSOR_SHARING
PropertyDescription
Parameter type
String
Syntax
CURSOR_SHARING = { SIMILAR | EXACT | FORCE }
Default value
EXACT
Modifiable
ALTER SESSION, ALTER SYSTEM
Basic
No
CURSOR_SHARING determines what kind of SQL statements can share the same cu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号