Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of ddl Operation after procedure and functon

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article shares with you the content of sample analysis of ddl operations after procedure and functon. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

SQL > create table dept (deptno number,dname varchar2 (10))

Table created.

SQL > CREATE OR REPLACE PROCEDURE add_dept (p_dept_id IN NUMBER

2 p_dept_name IN VARCHAR2) IS

3 BEGIN

4 INSERT INTO dept (deptno, dname) VALUES (p_dept_id, p_dept_name)

5 DBMS_OUTPUT.PUT_LINE ('Inserted' | | SQL%ROWCOUNT | | 'row')

6 commit

7 END

8 /

Procedure created.

SQL > set serveroutput on

SQL > exec add_dept (1)

Inserted 1 row

PL/SQL procedure successfully completed.

SQL > alter session set nls_date_format='yyyy-mm-dd hh34:mi:ss'

Session altered.

SQL > select sysdate from dual

SYSDATE

-

2018-04-25 19:56:45

SQL > select sysdate from dual

SYSDATE

-

2018-04-25 19:56:54

-- change table dept definition, ddl operation

SQL > alter table dept add (salary number)

Table altered.

SQL > select sysdate from dual

SYSDATE

-

2018-04-25 20:01:26

-- execute the save again

SQL > exec add_dept (2)

Inserted 1 row

PL/SQL procedure successfully completed.

Query table and saved ddl operation time and status

It is found that the ddl operation of the table has not been implemented, the status of both is still valid, and the execution of the save after the table ddl is still successful, and there is no error report!

Thank you for reading! This is the end of this article on "sample analysis of ddl operations after procedure and functon". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report