2012年4月18日
摘要: Lock:参考如下网址:http://broadh2o.net/docs/database/oracle/oracleLocks.html http://docs.oracle.com/cd/E11882_01/server.112/e10592/ap_locks001.htm#SQLRF55502 (Automatic Locks in DML Operations) http://docs.oracle.com/cd/E11882_01/server.112/e25789/consist.htm#CNCPT1339(数据库的事务和读一致性和O... 阅读全文
posted @ 2012-04-18 22:54 Coldest Winter 阅读(244) 评论(0) 推荐(0) 编辑
  2012年4月15日
摘要: 1、CONNECT1 Class.forName("org.postgresql.Driver");2 Connection connection = null;3 connection = DriverManager.getConnection(4 "jdbc:oracle:thin:@localhost:1521:mkyong","username","password");5 connection.close();JDBC & Statement2、STATAMENTThe “Statement” i 阅读全文
posted @ 2012-04-15 18:04 Coldest Winter 阅读(590) 评论(0) 推荐(0) 编辑
摘要: 参考网址:http://www.exampledepot.com/egs/java.sql/CallProcedure.htmlCalling a Stored Procedure in a DatabaseThis example demonstrates how to call stored procedures with IN, OUT, and IN/OUT parameters.COPYCallableStatement cs;try { // Call a procedure with no parameters cs = connection.prepareCall(" 阅读全文
posted @ 2012-04-15 14:31 Coldest Winter 阅读(423) 评论(0) 推荐(0) 编辑
  2012年4月7日
摘要: 参考网址:http://www.oradev.com/regular_expressions_sql_oracle.jspMetacharactersMeaningExamples\Indicates that the match character is a special character, a literal, or a backreference. (A backreference repeats the previous match.)相当于转义符\n matches the newline character,\\ matches \, \( matches (, \) matc 阅读全文
posted @ 2012-04-07 23:04 Coldest Winter 阅读(451) 评论(0) 推荐(0) 编辑
  2012年3月26日
摘要: 推出嵌套的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 阅读(964) 评论(0) 推荐(0) 编辑
  2012年3月20日
摘要: Collections and Records 阅读全文
posted @ 2012-03-20 06:17 Coldest Winter 阅读(397) 评论(0) 推荐(0) 编辑
  2012年3月19日
摘要: 以下为控制结构需要注意的:在条件判断比较多的情况下,推荐使用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 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(194) 评论(0) 推荐(0) 编辑
  2012年3月18日
摘要: ------------------------------------标识符 命名规则 实例程序变量 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 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(474) 评论(0) 推荐(0) 编辑