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

out 了 oracle 8i

近来接了个简单的系统做,外包的,用的数据库是oracle8i,
一开始我使用 ojdbc6.jar来做连接,连不上,找一番,原来官方oracle8i出的驱动只有 class12.jar 和class14.jar ,最要命的是不支持jdk1.4及1.4以上的,工作量马上就上来了。不甘心啊。
最后试了下,能用的只有ojadb14.jar ,连上了,不过通过hibernate生成的sql实在太烂,top 10都生成出来,部分语句能用,部分不能用,大部分不能用,好多情况都是手写的sql.
手写的也挺是累了,一个项目加班了好些天。
不过也有些心得,例如 orcale 的分页,如果heibernate能用的话就不自个写了
select * from
(select row_.*, rownum from (
  select * from table_name where a =? order by id
) where rownum <=50
)where rownum >10


相关文档:

Oracle多行记录合并/连接/聚合字符串的几种方法

什么是合并多行字符串(连接字符串)呢,例如:
SQL> desc test;
Name     Type          Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y       &nb ......

oracle 常用性能查询SQL分享

select count(1) from dictionary;
select * from dba_data_files;
select count(1) from dba_objects t where t.owner='BESTTONE';
select * from dba_tablespaces t where t.tablespace_name='BESTTONE';
select count(1) from dba_tables t where t.owner='BESTTONE';
select t.table_name,t.comments from diction ......

Oracle 表空间基本操作

1. 查询数据库现在的表空间
select tablespace_name, file_name, sum(bytes)/1024/1024 table_size from dba_data_files group by tablespace_name,file_name;
2. 建立表空间
CREATE TABLESPACE data01 DATAFILE '/oracle/oradata/db/DATA01.dbf' SIZE 500M;
3.删除表空间
DROP TABLESPACE data01 INCLUDING CONTENTS ......

Oracle 脚本(适应各种业务需要)


1. 取A表的数据,更新B表字段
update  m_build b
set b.district_id=(
  select d.district_id
  from 
    bjhouse.d_district d
  where
    b.build_name_jq=d.district_name)
where exists
  (select 1
  from ......

Oracle log files

Oracle log files : An introduction
 
The Oracle server maintains the redo Oracle log files to minimize the loss of data in the Database in case of an uncontrolled shutdown.
Online redo Oracle log files are filled with redo records. A redo record, also called a redo entry, is made up of a gr ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号