Understanding nested tables, PL-SQL Programming

Assignment Help:

Understanding Nested Tables

Within the database, the nested tables can be considered as one-column database tables. The Oracle stores the rows of a nested table in no specific order. But, when you retrieve the nested table into the PL/SQL variable, the rows are given consecutive subscripts starting at 1. That provides you array-like access to the individual rows.

Within PL/SQL, the nested tables are like one-dimensional arrays. Though, nested tables differ from arrays in two significant ways. Firstly, the arrays have a fixed upper bound, but nested tables are unbounded .Therefore, the size of a nested table can increase dynamically.

 

150_Understanding Nested Tables.jpg

                                   Figure: Array versus Nested Table


Secondly, the arrays should be dense (having consecutive subscripts). Therefore, you cannot delete individual elements from an array. Initially, the nested tables are dense, but they can be sparse (having nonconsecutive subscripts). And hence, you can delete elements from a nested table using the built-in procedure DELETE. That might leave gaps in the index, but the built-in function NEXT iterate over any series of subscripts.


Related Discussions:- Understanding nested tables

CURSOR, #quesWrite a cursor to open an employee database and fetch the empl...

#quesWrite a cursor to open an employee database and fetch the employee record whose age is greater than 45.tion..

Keyword and parameter description in pl sql, Keyword and Parameter Descript...

Keyword and Parameter Description: label_name: This is an undeclared identifier which optionally labels the PL/SQL block. When used, label_name should be enclosed by the do

Package utl file in pl/sql, UTL_FILE: The Package UTL_FILE permits you...

UTL_FILE: The Package UTL_FILE permits your PL/SQL programs to read & write operating system (OS) text files. It gives a restricted version of the standard OS stream file I/O,

Inserting objects in pl sql, Inserting Objects: You can use the INSERT...

Inserting Objects: You can use the INSERT statement to add objects to an object table. In the illustration below, you insert a Person object into the object table persons:

Named notation, Named Notation The second procedure call uses the name...

Named Notation The second procedure call uses the named notation. An arrow (=>) serve as the relationship operator that associates the formal parameter to the left of the arro

Application to export excel data to mssql server table, Application to Expo...

Application to Export Excel Data to MSSQL Server table I am having a table available in excel format and features the subsequent: - Some text is in Arabic (e.g. UTF-8 encodin

Pl sql code review, PL SQL Code Review HEADER ELEMENTS File Name ...

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

Existential quantification - sql, Existential Quantification - SQL Ex...

Existential Quantification - SQL Existential quantification-stating that something is true of at least one object under consideration-can be expressed by OR(r,c), meaning tha

Interesting properties of cross join - sql, Interesting properties of CROSS...

Interesting properties of CROSS JOIN - SQL Compare these with the "interesting properties of JOIN", CROSS JOIN is associative but not commutative. Unlike JOIN and NATURAL JOI

Python function, This task involves developing some functions that extract ...

This task involves developing some functions that extract data from an SQL database. The scenario is that a company which owns an online vehicle search website wants to generate so

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