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

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

什么是合并多行字符串(连接字符串)呢,例如:
SQL> desc test;
Name     Type          Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y                        
CITY     VARCHAR2(20) Y                        
SQL> select * from test;
COUNTRY               CITY
-------------------- --------------------
中国                  台北
中国                  香港
中国                  上海
日本                  东京
日本                  大阪
要求得到如下结果集:
-------     --------------------
中国        台北,香港,上海
日本        东京,大阪
   实际就是对字符实现一个聚合功能,我很奇怪为什么Oracle没有提供官方的聚合函数来实现它呢:)
   下面就对几种经常提及的解决方案进行分析(有一个评测标准最高★★★★★):
1.被集合字段范围小且固定型 灵活性★    性能★★★★ 难度 ★
   这种方法的原理在于你已经知道CITY字段的值有几种,且还不算太多,如果太多这个SQL就会相当的
长。。看例子:
SQL> select t.country,
   2   MAX(decode(t.city,'


相关文档:

oracle issue

Yes, sure ! You must be the local admin of this computer, and not a domain user.
Moreover, I'm afraid you cannot install it in a domain, maybe you should (just for testing purposes) try to install a standalone Windows system and try installing Oracle 10g on it.
You know, a RDBMS database server mu ......

Oracle数据库8i、9i默认用户存在弱口令

为这些用户名设置足够强壮的口令或锁定无用的默认用户。
SQL语句修改:
连接至Oracle后使用如下命令修改口令:
alter user system(用户名) identified by manager(密码);
连接至Oracle后使用如下命令锁定账号:
alter user test(用户名) account lock;
 
图形窗口修改:
Oracle服务openview上的用户:SCOT ......

oracle自动备份的一个批处理


if %time:~,2% leq 9  (set hh=0%time:~1,1%) else  (set hh=%time:~,2%)
exp wzolerp/wzolerp@wzol file=E:\数据库备份\wzolerp%date:~0,10%日%hh%时%time:~3,2%分.dmp log=E:\数据库备份\wzolerp%date:~0,10%日%hh%时%time:~3,2%分.log
exp wzolwms/wzolwms@wzol file=E:\数据库备份\wzolwms%date:~0,10%日 ......

oracle中的savepoints是什么

什么是savepoint?
Use the SAVEPOINT statement to identify a point in a transaction to which you can later roll back.
给你个例子 
SQL> create table test (id number(7)); 
表已创建。 
SQL> insert into test values (3); 
已创建 1 行。 
SQL> savepoint a; 
保存 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号