#
PL/SQL Developer 7.0 - New Features感興趣的功能(未測試)
Refactoring
The refactoring function allows you to quickly reorganize your PL/SQL code. It works on the selected code, or ?if no selection is made ?on the current statement. Refactoring functions include ?Rename item ?Convert selection to procedure ?Convert selection to local constant ? Convert selection to global constant ?Replace assignment with initialization.
Excel export
The Excel export function now adds the SQL Text on a second page of the excel sheet.
Session Filters
You can define session filters to limit the sessions displayed and/or to define which columns you want to see and in which order. You can include/omit columns from the v$session table, or add additional column joined from other tables. At the top of the Session Window you can select which filter you want to use:
好久沒有買計算機相關的書了, 今天在購書中心買了三本, 打算春節期間看看(不知有沒有時間)
1. <<Joel On Software>>
2. <<Effective Enterprise Java>>
3. <<Effective Oracle By Design>>
都是中文版的, 爭取在春節期間翻翻
年底了。事情可真多啊,離職,新工作,回家......
周五晚喝了個爛醉,本來要side的時間拿來休息了。
anyway, 祝各位
春節快樂!
摘要: Session.evict(), Session.setReadOnly()的用法
閱讀全文
摘要: Spring集成Commons FileUpload, 實現文件上傳
閱讀全文
摘要: 現在的ORM(如Hibernate)性能一直不是很理想, 一些大型的J2EE項目還是以JDBC為主, 但一直對SP(Stored Procedure)有抵制情緒, 搞得SQL滿天飛, 因最近幾周用PL/SQL弄歷史數據遷移的問題, 順便整理一下JDBC調用SP.
閱讀全文
Implicit Cursor FOR Loop
DECLARE
type_name VARCHAR2(10) := 'TABLE';
BEGIN
FOR item IN (SELECT object_name, status FROM user_objects WHERE object_type = type_name) LOOP
dbms_output.put_line('Table = ' || item.object_name || ', Status = ' || item.status);
END LOOP;
END;
/
Explicit Cursor FOR Loop
DECLARE
CURSOR c(type_name VARCHAR2) IS
SELECT object_name, status FROM user_objects WHERE object_type = type_name;
c_rec c%ROWTYPE;
BEGIN
FOR item IN c('TABLE') LOOP
dbms_output.put_line('Table = ' || item.object_name || ', Status = ' || item.status);
END LOOP;
OPEN c('TABLE');
LOOP
FETCH c INTO c_rec;
EXIT WHEN c%NOTFOUND;
dbms_output.put_line('Table = ' || c_rec.object_name || ', Status = ' || c_rec.status);
END LOOP;
CLOSE c;
END;
/
參考:
1. PL/SQL User's Guide and Reference
2. Java Oracle Database Development
Oracle已經建議使用lob代替long, 但舊應用中還有一些long類型, 在insert into select from中無法使用
long to long
declare
test_type long;
begin
select detail into test_type from table_long;
insert into table_long2(detail) values(test_type);
commit;
end;
/long to lob
insert into table_clob(detail) select to_lob(detail) from table_long;note: cannot use LOB locators selected from remote tables
參考:
1.
http://www.itpub.net/304707.html2. Oracle SQL Reference