Stored subprograms, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Stored subprograms

Create a procedure to tax calculation task, Complete the following steps to...

Complete the following steps to create a procedure to calculate the tax on an order. The BB_TAX table contains the states that require taxes to be submitted for Internet sales. If

Avoid the not null constraint - performance of application, Avoid the NOT N...

Avoid the NOT NULL Constraint In the PL/SQL, using the NOT NULL constraint incur a performance cost. Consider the illustration as shown below: PROCEDURE calc_m IS m NUMB

Object types and collections - performance of application, Use Object Types...

Use Object Types and Collections The Collection types and object types increase your efficiency by allowing for the realistic data modeling. The Complex real-world entities an

Package specification, The Package Specification The package specificat...

The Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to t

Managing cursors, Managing Cursors The PL/SQL uses 2 types of cursors: ...

Managing Cursors The PL/SQL uses 2 types of cursors: implicit and explicit. The PL/SQL declares a cursor implicitly for all the SQL data manipulation statements, including th

Components of an object type in pl/sql, Components of an Object Type: A...

Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no

Short-circuit evaluation-pl/sql expressions , Short-Circuit Evaluation ...

Short-Circuit Evaluation When computing a logical expression, the PL/SQL uses short-circuit evaluation. That is, the PL/SQL stops computing the expression as soon as the result

Components of an object type - attributes in pl/sql, Attributes: Just ...

Attributes: Just similar to variable, an attribute is declared with a name and datatype. The name should be exclusive within the object type. The datatype can be any Oracle ty

Sql pseudocolumns, SQL Pseudocolumns The PL/SQL recognizes the followin...

SQL Pseudocolumns The PL/SQL recognizes the following SQL pseudocolumns, that returns the specific data items: LEVEL, NEXTVAL, CURRVAL, ROWID, & ROWNUM. The Pseudocolumns are n

Relational operators-comparison operators, Relational Operators The rela...

Relational Operators The relational operators permit you to compare randomly complex expressions. The list below provides the meaning of each operator:

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd