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 purpose of the sql select top clause?
what is difference between delete and truncate commands? : Sql dba
What is row_number () in sql?
What are sql queries used for?
Can we create view in stored procedure?
How would you pass hints to the sql processor?
What is a pragma statement?
explain the difference between bool, tinyint and bit. : Sql dba
what is the difference between join and union? : Sql dba
What is a schema? How is it useful in sql servers?
Why stored procedures are faster than query?
Mention what does the hierarchical profiler does?
Can we rollback delete command?
What normalization means?
What is the purpose of a sql?