Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Declaring Records
Whenever you define a RECORD type, you may declare records of that type, as the illustration shows:
DECLARE
TYPE StockItem IS RECORD (
item_no INTEGER(3),
description VARCHAR2(50),
quantity INTEGER,
price REAL(7,2));
item_info StckItem; -- declare record
The identifier item_info represents the whole record.
Like the scalar variables, the user-defined records can be declared as the formal parameters of the procedures and functions. An illustration is as shown:
TYPE EmpRec IS RECORD (
emp_id emp.empno%TYPE,
last_name VARCHAR2(10),
job_title VARCHAR2(15),
salary NUMBER(7,2));
...
PROCEDURE raise_salary (emp_info EmpRec);
Declaring Subprograms You can declare subprograms in any PL/SQL subprogram, block, or package. But, you should declare subprograms at the end of the declarative part after a
1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is
Count Operator in SQL Example: Counting the students who have scored more than 50 in some exam (SELECT COUNT (*) FROM (SELECT DISTINCT StudentId FROM EXAM_MARK WHE
DELETE Statement The DELETE statement eliminates whole rows of data from the specified table or view. Syntax:
ROWNUM The ROWNUM returns a number representing the order in which a row was selected from the table. The first row selected has a ROWNUM of 1; the second row has a ROWNUM of
Rollback Behavior When a FORALL statement fails, the database changes are rolled back to an implicit savepoint marked before each of the SQL statement execution. The Changes t
DECLARE : This keyword signals the beginning of the declarative section of the PL/SQL block, that contains local declarations. The Items declared locally exist only within the
Keyword & Parameter Description: WHEN: This keyword introduces the exception handler. You can have many exceptions execute the similar sequence of the statements by follo
Parameter and Keyword Description: collection_name: This keyword identifies the index-by table, nested table, or varray formerly declared within the present scope. cu
Boolean Values Only the values TRUE, FALSE, & NULL can be assigned to a Boolean variable. For illustration, given the declaration DECLARE done BOOLEAN; the following statements
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd