What are Nested Tables? How will u delete 5 rows from Nested
Tables

Answer Posted / subrat ray

Nested tables hold an arbitrary number of elements. They use sequential numbers as subscripts.
You can define equivalent SQL types,allowing nested tables to be stored in database tables and manipulated through SQL.
->it does not have fixed upper bound.
->the data storage is out of line.

DECLARE
TYPE COURSELIST IS TABLE OF VARCHAR2(10);
COURSES COURSELIST;
BEGIN
COURSES:=COURSELIST('A','B','C','D','E','F','G','H','I');
DBMS_OUTPUT.PUT_LINE('THE TOTAL NO OF ELEMENTS ARE:'||COURSES.COUNT);
COURSES.DELETE(1,5);
DBMS_OUTPUT.PUT_LINE('THE NO OF ELEMENTS ARE PRESENT IS:'||COURSES.COUNT);
END;
SQL> /
THE TOTAL NO OF ELEMENTS ARE:9
THE NO OF ELEMENTS ARE PRESENT IS:4

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of sqlerrd 3?

682


What is schema in sql example?

826


Is coalesce faster than isnull?

703


What is sql trigger example?

751


Is primary key an index?

713






What do you mean by dbms? What are its different types?

746


What is consistency?

886


What is an exception in PL/SQL? What are the two types of exceptions?

851


What is the difference between truncate and drop statements?

763


How can we find duplicate records in a table?

664


Compare sql & pl/sql

773


what are date and time data types in mysql? : Sql dba

688


what is the syntax for using sql_variant_property? : Transact sql

708


What is a .db file?

724


How to select 10 records from a table?

841