Oracle中的Change命令

來源:互聯網
上載者:User

可以用Change命令來改變字串(即替換字串)。文法如下:

C[HANGE] sepchar old [sepchar [new [sepchar]]]

Sepchar 為分隔字元,可以是”/”或”!”  -- 請使用者特別注意

Old 舊字串

New新字串

例:將 除號(/)改為 乘號( * ),則需要命令為c !/!*!。即:
SQL> l
  1* select sal,sal/100 from emp
SQL> c !/!*!

提醒:對於修改 / 字元的只能用 ! 來作分隔字元(上例)。

例:將乘號( * )改為 加號( + ),則需要命令為c !/!*!   。即:
SQL> l
  1* select sal,sal*100 from emp
SQL> c/*/+/
  1* select sal,sal+100 from emp
SQL>

更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12

相關文章

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.