Stored subprograms, PL-SQL Programming

Stored Subprograms

Normally, tools (like Oracle Forms) which incorporate the PL/SQL engine can store subprograms locally for later, strictly local execution. Though, to become available for normal use, the subprograms should be stored in an Oracle database.

To create subprograms and store them everlastingly in an Oracle database, you can use the CREATE PROCEDURE and CREATE FUNCTION statements that you can execute interactively from the SQL Plus. For illustration, in the SQL Plus, you might create the procedure fire_employee, whih is as shown:

SQL> list

1 CREATE PROCEDURE fire_employee (emp_id NUMBER) AS

2 BEGIN

3 DELETE FROM emp WHERE empno = emp_id;

4* END;

SQL> /

Procedure created.

For the readability, at time creating the subprograms, you can use the keyword AS rather than IS in the specification.

Posted Date: 10/5/2012 5:27:44 AM | Location : United States







Related Discussions:- Stored subprograms, Assignment Help, Ask Question on Stored subprograms, Get Answer, Expert's Help, Stored subprograms Discussions

Write discussion on Stored subprograms
Your posts are moderated
Related Questions
Sequential Control Dissimilar to the IF and LOOP statements, the GOTO and NULL statements are not important to the PL/SQL programming. The configuration of PL/SQL is such that th

Scope Rules You cannot declare an exception twice in the similar block. Though, you can, declare the similar exception in 2 different blocks. The Exceptions declared in a bloc

Scoping Within the similar scope, all the declared identifiers should be unique. So, even if their datatypes differ, the variables and parameters cannot share the similar name.

Anatomy of a Command Figure, showing a simple SQL command, is almost identical to its counterpart in the theory book. The only difference arises from the fact that SQL uses a

Data Types in SQL - Character CHARACTER or, synonymously, CHAR, for character strings. When this type is to be the declared type of something (e.g., a column), the permissible

Use External Routines The PL/SQL is particular for the SQL transaction processing. Therefore, several tasks are more quickly completed in a lower-level language like C that is

I need SQL , WP SQL Expert Project Description: Expert required to modify WP SQL query. Skills required are MySQL, SQL, PHP, Wordpress

On occasion, some of Brewbean's customers mistakenly leave an item out of a basket already checked out, so they create a new basket containing the missing items. However, they requ

PL SQL Code Review HEADER ELEMENTS File Name Clear, meaningful and descriptive about main objective of the file. Multiple words are joined using underscores which adh

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar