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 does 0 mean in sql?

532


The select into statement is most often used to create backup copies of tables or for archiving records?

563


What does the file extension accdb stand for?

550


What is primary key in db?

523


What are the limitations of sql express?

530






Can a commit statement be executed as part of a trigger?

605


How do I write a cron which will run a sql query and mail the results to agroup?

529


What is a delimiter in sas?

550


Does execute immediate commit?

702


What is cross join sql?

504


how to decrement dates by 1 in mysql? : Sql dba

585


Explain locks? : Transact sql

575


How to convert comma separated string to array in pl/sql?

602


What is Collation Sensitivity ? What are the various type ?

501


What is a constraint? Tell me about its various levels.

640