What is Nested Table?

What is Nested Table?

Nested Table is a table inside a table. It can have several rows for each row of its parent table. Nested tables in oracle are similar to one dimensional array except the former’s size has no upper bound and can be increased dynamically. They are one column database tables where the rows of a nested table are not stored in a particular order.

Example:
Initialize a nested table
CREATE TYPE Dependent_birthdate_t AS VARRAY(10) OF DATE;
Now we can use it in the table definition:
CREATE TABLE employees (
          id NUMBER,
          name VARCHAR2(50),
          ...other columns...,
          Dependents_ages Dependent_birthdate_t
);
How to add a new column to an existing Table
How to add a new column to an existing Table - Use the ALTER TABLE command to do this....
How many types of Tables supported by Oracle?
How many types of Tables supported by Oracle? - Oracle supports 4 types of tables based on how data is organized in storage.....
What is trigger in oracle?
Triggers are constructs in PL/SQL that need to be just created and associated with a table....
Post your comment