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);
Advantages of Subprograms The Subprograms give extensibility; that is, tailor the PL/SQL language to suit your requirements. For illustration, if you require a procedure which
Using TRIM This process has two forms. The TRIM removes an element from the end of the collection. The TRIM(n) removes the n elements from the end of the collection. For e.g.
Using SAVEPOINT The SAVEPOINT names and marks the present point in the processing of a transaction. Used with the ROLLBACK TO statement, the savepoints undo parts of a transac
Write a pl/sql block that declares and uses cursors with parameters. In a loop, use a cursor to retrieve the department number and the department name from the departments table
Write a cursor to open an employee database and fetch the employee record whose age is greater than 45
V ariables and Constants in PL/SQL The PL/SQL permits you to declare constants and variables, and then use them in SQL and procedural statements anywhere in the expression. Th
Create a procedure named DDPROJ_SP that retrieves project information for a specific project based on a project ID. The procedure should have two parameters: one to accept a projec
Number Types The Number types permit you to store the numeric data (real numbers, integers, and floating-point numbers), show quantities, and do computations. BINARY_INTEG
I need SQL Data Base Project Description: Network SQL database and SQL Setup two 4 workstation Skills required are Data Entry, MySQL, SQL
Assignment Source Not a Literal - Variable Syntax: SET SN = SID (SUBSTRING (SN.C FROM 1 FOR 1)||'5');
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