Oracle學習筆記(一)

來源:互聯網
上載者:User

標籤:sysdba   修改   其他   儲存檔案   rom   編輯   set   sqlplus命令   nbsp   

1.常用sqlplus命令
  (1)查看當前登入使用者:show user;
  (2)切換當前登入使用者:conn 使用者名稱/密碼 (切換系統使用者+as sysdba );
  (3)斷開當前登入使用者:disc;
  (4)退出sqlplus:exit;
  (5)修改使用者密碼:passw(修改其他使用者密碼要+使用者名稱);
  (6)互動命令:&
    sql> select * from emp where job=‘&job‘;
  (7)編輯指令碼:edit
    sql> edit d:\aa.sql 會提示建立檔案並進行編輯
  (8)螢幕顯示記錄,儲存到檔案中:spool
    sql>spool on;開啟
    sql>spool d:/sql.sql;儲存檔案路徑
    sql>sql語句;
    sql>spool off;結束

  (9)設定顯示行的寬度:set linesize 字元數;(預設80)

    sql>show linesize;

    sql>set linesize 90;

  (10)設定每頁顯示行數:pagesize 行數;(預設14)

    sql>show pagesize;

    sql>set pagesize 90;

 

 

 

ps:本文為博主原創,轉載請註明出處:http://www.cnblogs.com/Y-zhiwei/。

Oracle學習筆記(一)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.