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
What is the use of sqlerrd 3?
What is schema in sql example?
Is coalesce faster than isnull?
What is sql trigger example?
Is primary key an index?
What do you mean by dbms? What are its different types?
What is consistency?
What is an exception in PL/SQL? What are the two types of exceptions?
What is the difference between truncate and drop statements?
How can we find duplicate records in a table?
Compare sql & pl/sql
what are date and time data types in mysql? : Sql dba
what is the syntax for using sql_variant_property? : Transact sql
What is a .db file?
How to select 10 records from a table?