SQL注意表别名尽量不适用X Y
今天一同事问我SQL为什么执行有问题。报错ora-06533 'OGC_X'...........仔细分析发现,sql没有解析变量x,因为sql中明显对x的字段引用错误,但是没有报出‘找不到标识符’。后发现x是synonym.猜想sql解析的时候是...
oracle [case] [delete]
case用法很简单,但是平时很少用,由此被问起竟忘了具体语法。create table t1 (id number);insert into t1(id) select level from dual connect by level<5;commit;select case id &...
oracle 10g新增hash group by 算法
决定hash group by 启用的参数是_gby_hash_aggregation_enabled 。查询是否启动:select ksppinm, ksppstvl from x$ksppi pi, x$ksppcv cv where cv.indx = pi.indx and pi.ksppinm ...
oracle 隐含参数的查询
【2个基本表】名字比较难记x$ksppi--可以查询参数的定义说明和x$ksppcv--可以查询参数的值例如:select ksppinm, ksppstvl from x$ksppi pi, x$ksppcv cv where cv.indx = pi.indx a...
LRM-00109 ORACLE 10.2.0.1
报错的记录---------------------------------------------------------------------------------------------------C:\Documents and Settings\Administrator>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Pro...
sqlplus set命令详解
set命令详解网站修改url中的最后一个关键字http://www.adp-gmbh.ch/ora/sqlplus/arraysize.html
快速生成Sqlplus可执行的外部文件
Oracle执行外部文件:c:>sqlplus user/pwd@dbsql>@new.sql执行多个sql文件:1.把所有的文件都放在同一个目录下,然后在命令行里执行命令: c:>dir/b > d:\1.sql...
在oracle 10g上修改dbname的实验
1 【参考资料】http://www.itpub.net/viewthread.php?tid=210292&extra=&page=1http://vecentli.itpub.net/post/14011/385725对以上资料的作者表示感谢 2  ...
ora-00604 ORA-01422
Microsoft Windows [版本 6.1.7600]版权所有 (c) 2009 Microsoft Corporation。保留所有权利。C:\Users\Administrator>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on 星期日 6月 13 15:55:02 2010...
函数-求字符串中字串的个数
create or replace function numofstr(par in clob, str in varchar2)--这个函数输出str在par中重复多少次 return number is f_num number := 0; f_clo...
oracle ddl
oracle DDL 语句使用比较灵活。1,如何修改一个列的默认值 alter table tab1 modify col1 default targetValue; 如何去掉一个列的默认值alter table tab1 modify col1 defa...
关于oracle分区表信息的查询(摘自网络)
查看所有用户分区表及分区策略(1、2级分区表均包括):SELECT p.table_name AS 表名, decode(p.partitioning_key_count, 1, '主分区') AS 分区类型,p.partitioning_type AS 分区类型, p.column_name AS 分区键,dec...
MYSQL INSTALL ERROR
http://www.mysqlpub.com/viewthread.php?tid=3671 记录一个我安装MYSQL的错误。 建议上传工具用xftp或者filezila 教训啊
ora-01555
http://www.hellodba.com/Doc/ORA-01555_analysis(1).htm HW 电话面的时候提出过。虽然自己没遇到过 ,也强力学习一把。
存储过程中返回游标类型的处理
create or replace procedure mycur(o out sys_refcursor)as begin open o for select * from node; end;如何在Sql·plus中调试? SQL>set autoprint on;SQL>var o REFCURSOR;SQL>exec mycur(:o);--注意使...
user schema pctfree pctused ,initrans maxtrans gment xtent lock
What about user & schema , pctfree & pctused ,initrans & maxtrans,tablespace ,segment ,extent & block? User :对象的所有和控制权。Schema:对象的所有权。形象的说是房子,user就是房子...
贴一个我写的小函数 在clob中查找str重复的次数
create or replace function numofstr(par in clob, str in varchar2)--这个函数输出str在par中重复多少次 return number is f_num number := 0; f_cl...
oracle10.2.0.1上not in的一个小问题
create table AL( NODE_ID VARCHAR2(128) not null, PROPERTY_ID VARCHAR2(128) not null, VALUE NUMBER not null, VINDEX&n...
java:从out = new BufferedWriter("c:\\test.txt")谈起,深入学习I/O流
希望读写一个文本文件,写了下面2句:BufferedWriter out;out = new BufferedWriter("c:\\test.txt");这种做法是错误的,正确写法是:BufferedWriter ut = newBufferedWriter( new fileWriter("c:\\test.txt"));===...
exp 导出命令中tables表
一个库中有上千张表,欲导出其中几个表之外的所有表。貌似exp没这命令。那就写tables了,但是太多了,只能查user_tables;并多行合并。写一个函数。create or replace function col2row return clob is text ...