pl/sql developer工具幾點妙用
2024-07-21 02:33:08
供稿:網友
相對而言,做Oracle數據查詢、更改時,本人較喜歡pl/sql developer,因為它居于多線程,不會鎖屏;不太喜歡toad,它動不動就鎖住屏幕。
但在查看過程或索引、分區等時,我則鐘儀Toad的快捷及方便。
個人認為:pl/sql developer 是所有oracle第三方客戶端軟件中最方便使用者之一,比起Toad之動
不動就鎖死屏幕不知好出多少倍。所以, 我喜歡使用它來查詢數據。也許大伙都有過這樣的體驗,
輸入命令或較長的表名時,我們經常打錯字,非凡是“select”和“From”這兩個更是如此(我見
過許多人都打錯它倆,打錯“select” 的稍少些)。想起Toad自帶的Auto_Replace功能,于是我就
在pl/sql developer中這晃晃,那瞧瞧,希望它本身也帶有類似auto_replace的東西,結果始終沒找著。
氣惱之下,來到它老家http://www.allroundautomations.nl/plsqldev.Html 點 add-ons鏈接
http://www.allroundautomations.nl/plsqldev.html后, 一項項細看,
最后終于看到了一個名叫shortcuts的外掛插件(PlugIn)
功能描述如下:
PL/Shortcuts
A handy utility that can help you if you feel that you're typing the same
things over and over again. You can create your own shortcuts (e.g. 's*' for
'select * from') and as soon as you type a shortcut in any editor it is
immediately replaced by the corresponding text.
New version! (Fixes Ctrl-Tab PRoblem)
Developed by Tiger
Requirements Download
PL/SQL Developer 2.1 shortcuts.zip (version 1.2) 87 KB
迫不及待,下載shortcuts.zip
解壓,讀幫助文件,安裝測試,哦。。。。。。成功了。
幫助文件如下:
Shortcuts PL/SQL Developer Plug-In
Just copy shortcuts.dll and shortcuts.txt to PlugIns folder & enjoy... tiger@softhome.net
------------------------------------------------------------------
安裝完畢,重啟pl/sql developer
菜單多出個 plugIns/shortcuts config....
選之,想怎么自動代換你就設吧。
比如設
QQ=SELECT * FROM
那你在窗口中輸入qq按空格
SELECT * FROM 就出來了
一些經常用的表 比如:bb_service_relation_t
我設個
bb=bb_service_relation_t
以后按 輸入bb及空格就出來跳出 bb_service_relation_t來。
因為做過代換后,我們已不需要鍵入如此之多的字母,整個輸入過程方便準確。
------------------------------------------------------------------
注:Toad 中自帶如樣的功能 edit/editor options/auto replace設完即可使用
我的pl/sql developer pl/shortcuts plugins 配置自動代換文件內容如下。
文件名:shortcuts.txt
/*qquser開頭的這句只能寫成一行,在此處只是方便理解我才分成三行*/
qquser=select a.apply_start_date,a.service_start_date,a.service_invalid_date,
a.user_id,a.if_valid,a.serving_status,a.*
from bb_service_relation_t a where service_id=
SKINd=service_kind
bsmenu=bs_favour_menu_t
qq=SELECT * FROM
bfg=bf_gather_fee_t
bfgh=bf_gather_fee_his_t
c_c=city_code
f_d=fee_date
bbms=bb_month_service_relation_t
bbs=bb_service_relation_t
qqlog=SELECT * FROM wcr_log_t WHERE TO_CHAR(report_time,'YYYYMMDD')=TO_CHAR(sysdate,'YYYYMMDD');
space=-----------------空行,預留
remn=--------------------------------------------------------------------------------------------
s_k=service_kind
s_b=special_bill
s_id=service_id
u_id=user_id
a_id=account_id
bbp=bb_user_prodUCt_info_t
rent=hnrpt_unicom_rent_mobile_t
bus=bb_bus_info_t
busd=bb_bus_detail_t;
event=apply_event
statust=bb_serving_status_t
查=select * from bb_service_relation_t where service_id='
allfee =fee1+fee2+fee3+fee4+fee11+fee12+fee13+fee14
rent_his=hnrpt_month_all_rent_his_t
his=hnrpt_month_all_rent_his_t
qqc=select count(*) from
pmon=TO_CHAR(ADD_MONTHS(SYSDATE,-1),'YYYYMM')
ren=hnrpt_unicom_rent_mobile_t
傳仁=bb_weicr_bus_info_change_t;
附:很多人都認為用pl/sql developer查詢時,不能象在Toad中一樣,輸入命令,按CtR+enter即可,
其實,前者要完成這個比后者更完美(后者在前后兩句查詢語句之間需要多輸一行空行,前者只要一個分號作分隔)
實現方法:/Tool/Preferences/SQL Windows/選中 Auto Select Statement 確定后即可。不過執行時默認
快鍵是 F8 而不是 CTR+回車
想用CTR+回車可如下設置
/Tool/Preferences/key configuration/ 設一把即可。