Toad最最常用的快捷键总结于此ROWID解析
Toad最最常用的快捷键总结于此ROWID解析
F8 调出以前执行的sql命令
F9 执行全部sql
Ctrl+t 补全table_name
Ctrl+. 补全table_name
alt+ 箭头上下 看sql history
Ctrl+Enter 直接执行当前sql
Ctrl+Shift+F 格式化sql语句。
配置让TOAD中显示ROWID信息
VIEW->TOAD OPTIONS->Data Grids->Data->display->show rowid in editable grids
根据ROWID如何解析出通俗易懂的信息呢?
[sql]
/* Formatted on 3/28/2013 09:20:15 (QP5 v5.240.12305.39446) */
CREATE OR REPLACE FUNCTION get_rowid (l_rowid IN VARCHAR2)
RETURN VARCHAR2
IS
ls_my_rowid VARCHAR2 (200);
rowid_type NUMBER;
object_number NUMBER;
relative_fno NUMBER;
block_number NUMBER;
ROW_NUMBER NUMBER;
BEGIN
DBMS_ROWID.rowid_info (l_rowid,
rowid_type,
object_number,
relative_fno,
block_number,
ROW_NUMBER);
ls_my_rowid :=
'Object# is :'
|| TO_CHAR (object_number)
|| CHR (10)
|| 'Relative_fno is :'
|| TO_CHAR (relative_fno)
|| CHR (10)
|| 'Block number is :'
|| TO_CHAR (block_number)
|| CHR (10)
|| 'Row number is :'
|| TO_CHAR (ROW_NUMBER);
RETURN ls_my_rowid;
END;
我们来调用一下:
[sql]
SELECT get_rowid('AAAfUGAAHAAAA48AAA') FROM DUAL;
Object# is :128262
Relative_fno is :7
Block number is :3644
Row number is :0