Home Database Oracle oracle database view stored procedure statements

oracle database view stored procedure statements

May 10, 2024 am 01:30 AM
oracle

View stored procedure statements in Oracle database: 1. Query the data dictionary; 2. Use the DBMS_METADATA package; 3. Use a command line tool (such as SQL*Plus or SQL Developer).

oracle database view stored procedure statements

View the statements of the stored procedures in the Oracle database

Query the data dictionary directly

SELECT * FROM USER_PROCEDURES
WHERE PROCEDURE_NAME = '存储过程名称';
Copy after login

Use the DBMS_METADATA package

SELECT DBMS_METADATA.GET_DDL('PROCEDURE', '存储过程名称') FROM DUAL;
Copy after login

Use the command line tool (SQL*Plus or SQL Developer)

SHOW PROCEDURE 存储过程名称
Copy after login

Details Expand

Using the data dictionary

Data dictionary tableUSER_PROCEDURES Stores information about the current user-defined stored procedure. The PROCEDURE_NAME column contains the name of the stored procedure.

Using the DBMS_METADATA package

The DBMS_METADATA.GET_DDL function returns the DDL statement for the specified object, including stored procedures.

Use the command line tool

SHOW PROCEDURE command to display the source code of the stored procedure.

Example

View the stored procedure named GET_CUSTOMER_ORDERS:

SELECT * FROM USER_PROCEDURES
WHERE PROCEDURE_NAME = 'GET_CUSTOMER_ORDERS';
Copy after login

The above is the detailed content of oracle database view stored procedure statements. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Function to calculate the number of days between two dates in oracle Function to calculate the number of days between two dates in oracle May 08, 2024 pm 07:45 PM

Function to calculate the number of days between two dates in oracle

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

How long will Oracle database logs be kept?

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The order of the oracle database startup steps is

How to use interval in oracle How to use interval in oracle May 08, 2024 pm 07:54 PM

How to use interval in oracle

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements

How to determine whether two strings are contained in oracle How to determine whether two strings are contained in oracle May 08, 2024 pm 07:00 PM

How to determine whether two strings are contained in oracle

How to see the number of occurrences of a certain character in Oracle How to see the number of occurrences of a certain character in Oracle May 09, 2024 pm 09:33 PM

How to see the number of occurrences of a certain character in Oracle

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

How much memory does oracle require?

See all articles