03 2012 档案
退出嵌套的FOR LOOP循环(直接退出所有的循环)
摘要:推出嵌套的FOR LOOP循环,有两种方法,第一种,使用GOTO语句跳出循环,跳到指定的位置,这时候,需要使用LABLE标记符; 1 DECLARE 2 V_COUNT NUMBER := 6; 3 BEGIN 4 FOR IDX1 IN 1 .. 5 LOOP 5 DBMS_OUTPUT.PUT_LINE('first---' || IDX1); 6 FOR IDX2 IN 1 .. 5 LOOP 7 DBMS_OUTPUT.PUT_LINE('secord---' || IDX2); 8 FOR IDX3 IN 1 .. 5 LOOP 9 ... 阅读全文
posted @ 2012-03-26 20:50 Coldest Winter 阅读(1091) 评论(0) 推荐(0)
Using PL/SQL Collections and Records
摘要:Collections and Records 阅读全文
posted @ 2012-03-20 06:17 Coldest Winter 阅读(408) 评论(0) 推荐(0)
Using PL/SQL Control Structures
摘要:以下为控制结构需要注意的:在条件判断比较多的情况下,推荐使用CASE语句代替IF/ELSE控制The value of a Boolean expression can be assigned directly to a Boolean variable. Youcan replace the first IF statement with a simple assignment:overdrawn := new_balance < minimum_balance;case语句:The ELSE clause isoptional. However, if you omit the EL 阅读全文
posted @ 2012-03-19 21:53 Coldest Winter 阅读(222) 评论(0) 推荐(0)
PL/SQL Datatypes
摘要:Overview of Predefined PL/SQL DatatypesA scalar type has no internal components. It holds a single value, such as a number orcharacter string.A composite type has internal components that can be manipulated individually, suchas the elements of an array.A reference type holds values, called pointers, 阅读全文
posted @ 2012-03-19 21:22 Coldest Winter 阅读(211) 评论(0) 推荐(0)
PL/SQL 命名规则
摘要:------------------------------------标识符 命名规则 实例程序变量 V_name V_name程序常量 C_Name C_company_name游标变量 Name_cursor Emp_cursor异常标识 E_name E_too_many表类型 Name_table_type Emp_record_type表 Name_table Emp记录类型 Name_record Emp_recordSQL*Plus 替代变量 P_name P_sal绑定变量 G_name G_year_sal---------------------------------- 阅读全文
posted @ 2012-03-18 20:54 Coldest Winter 阅读(348) 评论(0) 推荐(0)
PL/SQL User's Guide and Reference:PL/SQL Architecture
摘要:Block StructureThe basic units (procedures, functions, and anonymous blocks) that make up aPL/SQL program are logical blocks, which can be nested inside one another.A block groups related declarations and statements. You can place declarations close towhere they are used, even inside a large subprog 阅读全文
posted @ 2012-03-18 20:27 Coldest Winter 阅读(500) 评论(0) 推荐(0)
接口的匿名实现
摘要:匿名类是不能有名称的类,所以没办法引用它们。必须在创建时,作为new语句的一部分来声明它们。 这就要采用另一种形式的new语句,如下所示: new <类或接口> <类的主体> 这种形式的new语句声明一个新的匿名类,它对一个给定的类进行扩展,或者实现一个给定的接口。它还创建那个类的一个新实例,并把它作为语句的结果而返回。要扩展的类和要实现的接口是new语句的操作数,后跟匿名类的主体。 如果匿名类对另一个类进行扩展,它的主体可以访问类的成员、覆盖它的方法等等,这和其他任何标准的类都是一样的。如果匿名类实现了一个接口,它的主体必须实现接口的方法。如下所示的例子:接口:1 p 阅读全文
posted @ 2012-03-11 20:09 Coldest Winter 阅读(1090) 评论(0) 推荐(0)
Struts2 Design pattern - Builder pattern
摘要:以下是本文的参考网址:http://www.javacamp.org/designPattern/http://coolxing.iteye.com/blog/1446760http://luchar.iteye.com/blog/179619构造模式是一种对象的创建方式,它可以将一个复杂对象的内部构造特征与内部的构建过程完全分开,构造模式的种类很多,(有多种实现方式,每个实现方式不同,但是原理是相同的)可以总结出,构造模式主要设计四个角色:1、客户端角色(Client):调用具体的构造器,完成对象的构建,注意,这个角色只负责构造器的创建和选择,对于产品的具体信息不知晓。2、抽象构造器角色(B 阅读全文
posted @ 2012-03-11 07:52 Coldest Winter 阅读(378) 评论(0) 推荐(0)
Struts2 Design pattern - ThreadLocal pattern
摘要:ThreadLocal模式是为了解决多线程程序中,数据共享的问题,ThreadLocal模式贯穿了整个Struts2和Xwork框架。 阅读全文
posted @ 2012-03-10 20:44 Coldest Winter 阅读(132) 评论(0) 推荐(0)
Java Thread And Runnable
摘要:进程:它是程序的一次动态执行过程,它需要经历从代码加载,到代码执行,到执行完毕的一个完整过程,这个过程也是进程从产生、发展到最终消亡的过程。线程:线程是比进程更小的执行单位,它是在进程的基础上进一步划分,所谓多线程,是指一个进程在执行的过程可以产生多个更小的程序单元,这些更小的单元-称为线程。这些线程可以同时存在,同时运行,一个进程可能产生多个同时执行的线程。----------java中进程的实现:1、继承Thread类实现多线程: 1 package com.dyj.test; 2 3 public class TestThread extends Thread { 4 5 p... 阅读全文
posted @ 2012-03-10 19:59 Coldest Winter 阅读(561) 评论(0) 推荐(0)
Oracle altet table Rules
摘要:Oracle 修改表的限制 To make a NOT NULL column nullable, use the alter table command with the NULL clause,as follows:alter table TROUBLE modify(Condition NULL);The Rules for Adding or Modifying a ColumnThese are the rules for modifying a column: (在任何情况下) 1、You can increase a character column’s wi... 阅读全文
posted @ 2012-03-10 14:18 Coldest Winter 阅读(307) 评论(0) 推荐(0)
Oracle Lock and Hibernage Lock
摘要:http://orafaq.com/node/854ORACLE锁: Oracle uses locks to control concurrent access to data. A lock gives you temporary ownership of a database resource such as a table or row of data. Thus, data cannot be changed by other users until you finish with it. You need never explicitly lock a resource becau 阅读全文
posted @ 2012-03-10 12:06 Coldest Winter 阅读(308) 评论(0) 推荐(0)
Oracle Function-NEXT_DAY,TRUNC,ROUND,CEIL,SIGN
摘要:注意:国际通用的日期中;周末才是一个周的第一天ROUND and TRUNC Date Functionsnext lists the format models you can use with the ROUND and TRUNC date functions and the units to which they round and truncate dates. The default model, 'DD', returns the date rounded or truncated to the day with a time of midnight.Date F 阅读全文
posted @ 2012-03-10 11:55 Coldest Winter 阅读(673) 评论(0) 推荐(0)
Oracle Function: Case and Decode
摘要:CASE expression perform if-then-else logic in SQL without having to use PL/SQL.CASE works in a similar manner to DECODE().CASE is ANSI-compliant.There are two types of CASE expressions: Simple case expressions use expressions to determine the returned value. Searched case expressions use condi... 阅读全文
posted @ 2012-03-10 09:44 Coldest Winter 阅读(872) 评论(0) 推荐(2)
Oracle With Clause
摘要:本文参考网址:http://psoug.org/reference/with.html http://www.oracle-base.com/articles/misc/with-clause.php http://gennick.com/with.html------Understanding the WITH Claus 参考文档下载地址:http://ishare.iask.sina.com.cn/f/21674385.html The WITH query_name clause lets you assign a nam... 阅读全文
posted @ 2012-03-08 20:56 Coldest Winter 阅读(3971) 评论(0) 推荐(1)
Flashback—Tables and Databases
摘要:As of Oracle Database 10g, you can use the flashback table and flashback databasecommands to simplify your data-recovery efforts. The flashback table commandautomates the process of restoring a full table to its prior state. The flashbackdatabase command flashes back an entire database, and it req.. 阅读全文
posted @ 2012-03-07 22:38 Coldest Winter 阅读(375) 评论(0) 推荐(0)
Oracle调度之DBMS_JOB
摘要:Oracle调度是指定时的启动程序,执行相应的操作,Oracle10G中dbms_job包(位于SYS用户下),Oracle已经提供了DBMS_SCHEDULER用来替代它。逐步的摒弃dbms_job包。This package is deprecated and has been supplanted by DBMS_SCHEDULER.dbms_job包下使用的参数: -- JOB is the number of the job being executed. -- WHAT is the PL/SQL procedure to execute. -- The job must... 阅读全文
posted @ 2012-03-07 20:46 Coldest Winter 阅读(1247) 评论(0) 推荐(0)
Working with Tablespaces
摘要:Tablespaces and the Structure of the Database People who have worked with computers for any period of time are familiar with the concept of afile; it’s a place on disk where information is stored, and it has a name. Its size is usually not fixed: Ifyou add information to the file, it can grow larg.. 阅读全文
posted @ 2012-03-07 07:07 Coldest Winter 阅读(397) 评论(0) 推荐(1)
Reflect in Java
摘要:java反射的使用: 1 package com.test.struts2; 2 3 import java.lang.reflect.Constructor; 4 import java.lang.reflect.Field; 5 import java.lang.reflect.Method; 6 7 import com.opensymphony.module.sitemesh.util.ClassLoaderUtil; 8 9 public class TestReflect { 10 11 private String userName; 12 1... 阅读全文
posted @ 2012-03-06 20:26 Coldest Winter 阅读(280) 评论(0) 推荐(0)
backup methods-exp and imp
摘要:几种常见的Oracle备份方法:The backup methods provided by Oracle can be categorized as follows:■ Logical backups using Data Pump Export and Import■ Logical backups using Export (and its companion utility, Import)■ Physical file system backups: offline backups and online backups■ Incremental physical file syste 阅读全文
posted @ 2012-03-05 22:39 Coldest Winter 阅读(351) 评论(0) 推荐(0)