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
Hi: select replace(column_name,CHR(13),'') from table_name; If it didn't work, try CHR(10) intead of CHR(13).
To work with strings in your PL/SQL programs, you declare variables to hold the string values. To declare a string variable, you must select from one of the many string data types Oracle Database offers, including CHAR, NCHAR, VARCHAR2, NVARCHAR2, CLOB, and NCLOB.
Simply stating you require an additional single quote character to print a single quote character. That is if you put two single quote characters Oracle will print one. The first one acts like an escape character. This is the simplest way to print single quotation marks in Oracle.
Use DBMS_OUTPUT.PUT
instead of DBMS_OUTPUT.PUT_LINE
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With