oldwain随便写 http://oldwain.itpub.net/ <a href="http://oldwain.itpub.net">oldwain随便写</a>

也许你还不知道 - sqlplus的小秘密(1)

上一篇 / 下一篇  2005-09-05 00:00:00 / 个人分类:Oracle

有没有为了dbms_output.put_line会"吃掉"最前面的空格而苦恼?

scott@O9I.US.ORACLE.COM> set serveroutput on
scott@O9I.US.ORACLE.COM> exec dbms_output.put_line('   abc');
abc

PL/SQL procedure successfully completed.

ITPUB个人空间] R.XC9[7^)e

(俺以前曾经很苦恼为了保留空格, 尝试了加".", 加不可见字符等办法, 不过终究觉得不自然)ITPUB个人空间E8t%s r,TY/cdC/I*y
实际上, 只要在set serveroutput on后加上format wrapped参数, 就可以避免这个问题

scott@O9I.US.ORACLE.COM> set serveroutput on format wrapped
scott@O9I.US.ORACLE.COM> exec dbms_output.put_line('   abc');
   abc

PL/SQL procedure successfully completed.

TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-11-23  
      1
2345678
9101112131415
16171819202122
23242526272829
30      

数据统计

  • 访问量: 2741
  • 日志数: 1042
  • 建立时间: 2007-11-28
  • 更新时间: 2008-02-22

RSS订阅

Open Toolbar