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如何解析出通俗易懂的信息呢?

/* 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;

我们来调用一下:

SELECT get_rowid('AAAfUGAAHAAAA48AAA') FROM DUAL;


Object# is :128262
Relative_fno is :7
Block number is :3644
Row number is :0

个人链接:
--------------------------------
JavaMail实现(JAVA <wbr><wbr><wbr>SWING) 新浪微博:http://weibo.com/cwtree

           JavaMail实现(JAVA <wbr><wbr><wbr>SWING) 人人首页:www.renren.com/treelovexiaobei

           JavaMail实现(JAVA <wbr><wbr><wbr>SWING) 优酷空间: http://i.youku.com/cwtree

              JavaMail实现(JAVA <wbr><wbr><wbr>SWING) 科大首页:http://home.ustc.edu.cn/~cwtree/
--------------------------------




你可能感兴趣的:(Toad最最常用的快捷键 总结于此 ROWID解析)