当前位置:网站首页>DBMS in Oracle_ output. put_ How to use line
DBMS in Oracle_ output. put_ How to use line
2022-06-23 13:23:00 【Yisu cloud】
Oracle in dbms_output.put_line How do you use it?
This article mainly introduces “Oracle in dbms_output.put_line How do you use it? ”, In daily operation , I believe a lot of people are Oracle in dbms_output.put_line There are doubts about how to use it , Xiao Bian consulted all kinds of materials , Sort out simple and easy-to-use operation methods , I hope to answer ”Oracle in dbms_output.put_line How do you use it? ” Your doubts help ! Next , Please follow Xiaobian to learn !
dbms_output.put_line Usage of
The knowledge points involved are as follows :
1、enable:
stay serveroutput on Under the circumstances , Used to make dbms_output take effect ( Open by default )
set serveroutput on -- take output Service open
2、disable:
stay serveroutput on Under the circumstances , Used to make dbms_output invalid
set serveroutput off -- take output Service closing

3、put:
Write content to memory , wait until put_line Output together ,new_line You can also output .
begin dbms_output.put_line('hello world1111111'); dbms_output.new_line(); dbms_output.put('Hello, Lao An '); dbms_output.put('Hello, Lao An '); dbms_output.new_line(); dbms_output.put_line('Hello, Lao An ');end;/Output :

4、put_line:
Needless to say , The output characters , And refresh buffer, Premise is set severoutput on;
exec dbms_output.put_line('hello world1111111');
5、new_line:
As the end of a line , It can be understood as writing buffer Line break at
set serveroutput onbegin dbms_output.put_line('hello world1111111'); dbms_output.put('Hello, Lao An'); dbms_output.new_line(); dbms_output.put_line('Hello, Lao An');end;/
It uses begin+/ To execute PL/SQL The process , Let me explain oracle Middle slash (/) The meaning of
The slash is to make The server Execute the previously written sql Script . If it's normal select sentence , A semicolon , You can do it . But if it's a stored procedure , Then meet a semicolon , You can't do it right away . This is the time , You need to pass the slash (/) To execute .

6、get_line(value, index):
Get the single line information of the buffer .
notes : Use get_line You can't use put_line Output , because put_line After that will be buffer Empty .( Of course. serveroutput off Under the circumstances put_line It doesn't affect buffer Of ).
7、get_lines(array, index):
Get the multi line information of the buffer in the form of an array
declare v_data dbms_output.chararr; -- Declare local variables first v_numlines number; begin --enable the buffer first. dbms_output.enable(1000000); -- Set the size of the buffer dbms_output.put_line('line one'); dbms_output.put_line('line two'); dbms_output.put_line('line three'); v_numlines := 3; dbms_output.get_lines(v_data, v_numlines); --array, index for v_counter in 1..v_numlines loop dbms_output.put_line(v_data(v_counter)); end loop; end; /Output :

Here we are , About “Oracle in dbms_output.put_line How do you use it? ” That's the end of my study , I hope we can solve your doubts . The combination of theory and practice can better help you learn , Let's try ! If you want to continue to learn more related knowledge , Please continue to pay attention to Yisu cloud website , Xiaobian will continue to strive to bring you more practical articles !
边栏推荐
- The two 985 universities share the same president! School: true
- Esp32-c3 introductory tutorial problems ⑧ - blufi_ example. c:244: undefined reference to `esp_ ble_ gap_ start_ advertising
- kubernetes comfig subpath
- What should testers do if the requirements need to be changed when the project is half tested?
- 同花顺网上开户安全吗,需要注意什么
- R language dplyr package arrange function sorts dataframe data and sorts dataframe data through multiple data columns (ascending sort by default)
- 怎么手写vite插件
- Homekit and NFC support: smart Ting smart door lock SL1 only costs 149 yuan
- 20000 words + 30 pictures | MySQL log: what is the use of undo log, redo log and binlog?
- C # learning (advanced course) day15 - exception handling and namespace
猜你喜欢

腾讯的技术牛人们,是如何完成全面上云这件事儿的?

Qunhui 10 Gigabit network configuration and test

64 channel telephone +2-channel Gigabit Ethernet 64 channel PCM telephone optical transceiver voice telephone to optical fiber

Esp32-c3 introductory tutorial problem ⑦ - fatal error: ESP_ Bt.h: no such file or directory ESP not found_ bt.h

What are the criteria for judging the end of the test?

Go write permissions to file writefile (FileName, data, 0644)?

#yyds干货盘点# 解决剑指offer: 判断是不是平衡二叉树

华三交换机配置SSH远程登录

Hanyuan high tech new generation green energy-saving Ethernet access industrial switch high efficiency energy-saving Gigabit Industrial Ethernet switch

Playing in Singapore in the hot summer: an inventory of indoor attractions and good places for night trips
随机推荐
20 years' Shanghai station D question Walker (two points, concise)
Go写文件的权限 WriteFile(filename, data, 0644)?
R语言dplyr包mutate_all函数将dataframe中的所有数值数值列(变量)乘以某一固定值并生成新的数据列,为新的数据列(变量)指定自定义后缀名称
Esp32-c3 introductory tutorial problems ⑧ - blufi_ example. c:244: undefined reference to `esp_ ble_ gap_ start_ advertising
在線文本過濾小於指定長度工具
Online text filter less than specified length tool
Online text entity extraction capability helps applications analyze massive text data
Interview question: for example, how do you do interface testing at work?
Go寫文件的權限 WriteFile(filename, data, 0644)?
Part C - value types and reference types
A bug development means that the user will not operate like this, and there is no need to repair it. How should testers respond?
Based on your work experience, talk about the quality system construction in software testing
Lm05 former VIX (second generation product)
Technology sharing | wvp+zlmediakit realizes streaming playback of camera gb28181
React query tutorial ④ - cache status and debugging tools
4E1 PDH optical transceiver 19 inch rack type single fiber transmission 20km E1 interface optical network optical transceiver
How long is the financial product? Is it better for novices to buy long-term or short-term?
What is the version of version 1.54 when connecting to Oracle?
Qunhui 10 Gigabit network configuration and test
POW consensus mechanism