2015-07 from--https://blog.csdn.net/u010735684/article/details/46812087
进入plsql后,选择工具—首选项 如图所示:
在首选项里 找到用户界面下的编辑器,点击右侧框中的编辑 或者类似文件夹的图标,可以进行编辑或者导入已经编辑好的文件,我这里是建立了txt文件,文件内容如下
s=SELECT
f=FROM
w=WHERE
o=ORDER BY
dt=DELETE
sf=SELECT * FROM
df=DELETE FROM
sc=SELECT COUNT(*) FROM
g=GROUP BY
h=HAVING
tt=TRUNCATE TABLE
dr=DROP TABLE
ct=CREATE TABLE
sd=SELECT DISTINCT
ei=EXECUTE IMMEDIATE
ll=SELECT S.USERNAME,DECODE(L.TYPE, ‘TM’, ‘TABLE LOCK’, ‘TX’, ‘ROW LOCK’, NULL) LOCK_LEVEL,O.OWNER, O.OBJECT_NAME,O.OBJECT_TYPE,S.SID, S.SERIAL#, S.TERMINAL, S.MACHINE, S.PROGRAM,S.OSUSER FROM V$SESSION S, V$LOCK L, DBA_OBJECTS O WHERE L.SID = S.SID AND L.ID1 = O.OBJECT_ID(+) AND S.USERNAME IS NOT NULL
kp=SELECT A.SPID,B.SID,B.SERIAL#,B.USERNAME FROM V$PROCESS A,V$SESSION B WHERE A.ADDR = B.PADDR AND B.STATUS = ‘KILLED’–查看处于Killed状态的进程
ki=ALTER SYSTEM KILL SESSION ‘143,125’;
ork=orakill orcl 12345;
re=SELECT ‘ALTER database TEMPFILE ”’ || FILE_NAME || ”’ resize 100M ;’ FROM DBA_TEMP_FILES;
语句解释:s就代表select 在plsql中 只需要输入s然后回车 ,工具就会自动出来select,一下类推,特别好用,节省时间