sqlplus中change命令的用法

xypincle發表於2017-03-25

  1. Oracle中的Change(替換字串)命令
  2.  
  3. SQL> help change
  4.  
  5.  CHANGE
  6.  ------
  7.  
  8. Changes the first occurrence of the specified text on the current line of the SQL buffer.
  9. The buffer has no command history list and does not record SQL*Plus commands.
  10.  
  11. C[HANGE] sepchar old [sepchar [new[sepchar]]]
  12.  
  13. 可以用Change命令來改變字串(即替換字串)
  14. 語法如下:
  15. C[HANGE] sepchar old [sepchar [new [sepchar]]]
  16. Sepchar為分隔符,可以是”/”或”!”  --請使用者特別注意
  17. Old舊字串
  18. New新字串

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

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


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28878983/viewspace-2136078/,如需轉載,請註明出處,否則將追究法律責任。

相關文章