如何使用 pl/sql 打印字符串而不在末尾附加换行符

发布于 2024-12-10 04:59:56 字数 162 浏览 0 评论 0 原文

如果我使用 DBMS_OUTPUT.PUT_LINE() 方法,它总是在末尾附加一个新行字符。

但是如果我想在同一行打印斐波那契数列怎么办?

我知道斐波那契的逻辑...

我只想知道我将使用哪种方法将整个输出放在同一行中。

我正在使用 PL/SQL

If I use DBMS_OUTPUT.PUT_LINE() method, it always appends a new line character at end.

But what if I want to print lets say Fibonacci series in same line.

I know the logic of fibonacci...

I just want to know which method would I use to put whole output in same line.

I am using PL/SQL

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦初启 2024-12-17 04:59:56

使用DBMS_OUTPUT.PUT而不是DBMS_OUTPUT.PUT_LINE

Use DBMS_OUTPUT.PUT instead of DBMS_OUTPUT.PUT_LINE

原来分手还会想你 2024-12-17 04:59:56

版本 11gR2 的所有文档的入口点是 Oracle 数据库在线文档的所有书籍库 11g 第 2 版 (11.2)

对于其他 Oracle 数据库版本,您可能需要从数据库文档开始探索。从版本 12.1 开始,URL 更简单: http://docs.oracle.com/ 12.1 和 href="http://docs.oracle.com/database/122/nav/portal_booklist.htm" rel="nofollow noreferrer">http://docs.oracle.com/database/122/nav/portal_booklist.htm< /a> 对于 12.2。

您可能需要检查PL/SQL 包和类型参考 对于此类问题。特别是DBMS_OUTPUT 子程序摘要。当您对 PL/SQL API 有疑问时,该文档作为参考非常方便。

The entry point for all the doc of version 11gR2 is All Books for Oracle Database Online Documentation Library 11g Release 2 (11.2).

For other Oracle database versions you might want to start your exploration from Database Documentation. Since version 12.1 the URLs are easier : http://docs.oracle.com/database/121/nav/portal_booklist.htm for 12.1 and http://docs.oracle.com/database/122/nav/portal_booklist.htm for 12.2.

You might want to check PL/SQL Packages and Types Reference for that kind of question. In particular the Summary of DBMS_OUTPUT Subprograms. The doc is really handy as a reference when you have questions about the PL/SQL API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文