Write an anonymous block that contains a pl/sql function, PL-SQL Programming

a. Write an anonymous block that contains a PL/SQL function. Given an order number orderNo, the function will calculate the total number of the parts in the order. Then the anonymous block should use the function to find the total number of parts for the order with orderNo=1020. Verify if the result is correct.

b. Write a stored function. Similarly, the function has an input parameter orderNo and calculates the total number of the parts in the order.

Posted Date: 5/6/2013 2:42:12 AM | Location : United States







Related Discussions:- Write an anonymous block that contains a pl/sql function, Assignment Help, Ask Question on Write an anonymous block that contains a pl/sql function, Get Answer, Expert's Help, Write an anonymous block that contains a pl/sql function Discussions

Write discussion on Write an anonymous block that contains a pl/sql function
Your posts are moderated
Related Questions
Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

At times, Brewbean's has changed the id number for existing products. In the past, they have had to add a new product row with the new id to the BB_PRODUCT table, modify all the co

Example of Check Constraints Example: Workaround for when subqueries not permitted in CHECK constraints CREATE FUNCTION NO_MORE_THAN_20000_ENROLMENTS ( ) RETURNS BOOLEAN

Parameter Aliasing   To optimize the subprogram call, the PL/SQL compiler can decide between the two techniques of the parameter passing. With the by-value techniques, the v

to write a heap sort program usin pl-sql

How Calls Are Resolved? The figure shows that how the PL/SQL compiler resolves the subprogram calls. When the compiler encounters the procedure or function call, it tries to di

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.

NULL Statement The NULL statement clearly specifies in action; it does nothing other than to pass control to the next statement. It can, though, improve the readability. In a

Using DEFAULT You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration blood_type CHAR := ’O’; it can b

ROWID and UROWID Internally, every database table has a ROWID pseudo column that stores binary values known as rowids. Each rowid shows the storage address of a row. A physical