Search
 
SCRIPT & CODE EXAMPLE
 

SQL

create pl/sql stored procedure

CREATE [OR REPLACE] PROCEDURE proc_name [list of parameters] 
IS | AS    
   //Declaration block 
BEGIN    
   //Execution block 
EXCEPTION    
  //Exception block 
END;
Comment

pl/sql procedure example

CREATE OR REPLACE PROCEDURE my_schema.my_procedure(param1 IN VARCHAR2) IS
    cnumber NUMBER;
BEGIN
    cnumber := 10;
    INSERT INTO my_table (num_field) VALUES (param1 + cnumber);
    COMMIT;
EXCEPTION
    WHEN OTHERS THEN
        raise_application_error(-20001, 'An error was encountered - '
            || sqlcode || ' -ERROR- ' || sqlerrm);
END;
Comment

pl/sql procedure

CREATE [OR REPLACE] PROCEDURE procedure_name
    [ (parameter [,parameter]) ]

IS
    [declaration_section]

BEGIN
    executable_section

[EXCEPTION
    exception_section]

END [procedure_name];
Comment

procedure plsql

CREATE PROCEDURE nome_procedura [(parametri)] IS
	Definizioni;
BEGIN
	Corpo procedura;
END;
Comment

PREVIOUS NEXT
Code Example
Sql :: CALCULATING MONTHS BETWEEN TWO DATES IN POSTGRESQL 
Sql :: sql pagination 
Sql :: mysql show views 
Sql :: SQL Auto Increment Primary Key - PostgreSQL 
Sql :: select last 30 days sql 
Sql :: remove unique key from a table 
Sql :: how to transfer pandas datafra,e to sqlite 
Sql :: create mysql database on windows 
Sql :: modify column name in sql 
Sql :: mariadb mysql root access denied 
Sql :: sql count number of rows after group by 
Sql :: convert varchar column to int in sql server 
Sql :: connect mysql command line 
Sql :: oracle list grants on package 
Sql :: check if has alpha characters sql 
Sql :: What is dialect for Postgres 
Sql :: add colum date in sql 
Sql :: print integer and string in SQL 
Sql :: sql update statement 
Sql :: sql all 
Sql :: how to enable mysql 5.7 root user password on linux 
Sql :: get last 50 rows sql 
Sql :: mysql remove first and last character from string 
Sql :: postgress connection refused 
Sql :: upper case sql 
Sql :: sql number columns 
Sql :: sql log file inof 
Sql :: mysql limit 
Sql :: dba_dependencies 
Sql :: view table sql 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =