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 PL/SQL

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

PREVIOUS NEXT
Code Example
Sql :: CONCAT_WS() concat function we can use for adds two or more expressions together with a separator or delimeter. 
Sql :: check if string is a number sql 
Sql :: Alter table add column in SQL Server- NAYCode.com 
Sql :: mysql insert value date 
Sql :: c# sql select 
Sql :: oracle show column of table 
Sql :: oracle sql create table from select 
Sql :: backup a table in sql 
Sql :: Assign value to var in SQL 
Sql :: postgres delete all tables 
Sql :: how to assign date field for table in mysql 
Sql :: check constraint in sql 
Sql :: sqlite truncate tables command 
Sql :: Get the Db column names from a SqlDataReader 
Sql :: how to extract year from date in sql 
Sql :: cursor.execute in python sqlite3 
Sql :: compare date mysql 
Sql :: drop multiple columns in sql 
Sql :: mysql set last_insert_id 
Sql :: show table postgres command 
Sql :: mysql count number of occurrences in a column 
Sql :: sql drop column 
Sql :: oracle running queries sql 
Sql :: postgres select as csv 
Sql :: SQL NOT BETWEEN Operator 
Sql :: check if a column is a primary key in sql server 
Sql :: how to inner join 4 tables in sql 
Sql :: python sqlite3 update 
Sql :: PSQL use LIKE with timestamps 
Sql :: creating a table sql 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =