Search
 
SCRIPT & CODE EXAMPLE
 

SQL

stored procedure sql

-- without parameters; create
CREATE [OR ALTER] PROCEDURE <pname>
AS
BEGIN
<PROCEDURE BODY/ STATEMENTS>
END

-- call procedure
EXECUTE / EXEC <pname>;
(OR)
EXECUTE / EXEC <pname> VALUE / (S)
Comment

sql procedure

CREATE OR REPLACE PROCEDURE my_scheme.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

stored procedure sql

-- without parameters; create
CREATE [OR ALTER] PROCEDURE <pname>
AS
BEGIN
<PROCEDURE BODY/ STATEMENTS>
END

-- call procedure
EXECUTE / EXEC <pname>;
(OR)
EXECUTE / EXEC <pname> VALUE / (S)
Comment

PREVIOUS NEXT
Code Example
Sql :: hour must be between 1 and 12 
Sql :: querry mysql by 2 columns 
Sql :: how to delete python anywhere mysql database 
Sql :: mysql autoincrement valor inicial 
Sql :: case construct in where clause 
Sql :: sql server fn_dblog 
Sql :: cara menampilkan user di mysql terminal 
Sql :: order of execution in sql 
Sql :: mysql error the maximum column size is 767 bytes. 
Sql :: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3@4.2.0 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.2.0 install script. 
Sql :: mssql default connection string 
Sql :: initialize sql date 
Sql :: convert all tables in database to from myisam to innodb 
Sql :: how to use select union and loop 
Sql :: sql max value in column 
Sql :: mysql join column order By and group By 
Sql :: concatenation in sql 
Sql :: oracle sql get value from several rows and concatenate strings 
Sql :: psql invalid command N 
Sql :: drop a field in psql django 
Sql :: insert into from 
Sql :: can you put a break command in sql 
Sql :: get last inserted primary key 
Sql :: PG::ForeignKeyViolation: ERROR: update or delete on table violates foreign key constraint 
Sql :: grant sql 
Sql :: mysql write into table 
Sql :: mysql current date between two dates 
Sql :: sql server concat null 
Sql :: select * from 
Sql :: oracle alter table 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =