logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is a Collection? Explain collection types.


  • Correct Answer
  • A collection just like an array is an ordered group of elements of the same type Each elements position is determined by a unique subscript Index by tables:- They are similar to hash arrays that allows to search for subscript values using arbitrary numbers and strings They can be declared as: TYPE type_name IS TABLE OF element_type [NOT NULL] INDEX BY [BINARY_INTEGER | PLS_INTEGER | VARCHAR2(size_limit)]; INDEX BY key_type; Example: TYPE studenttyp IS TABLE OF emp%ROWTYPE INDEX BY BINARY_INTEGER; stud_tab studenttyp; Nested tables:- they hold random number of elements and use sequential numbers as sub scripts They can be declared as: TYPE type_name IS TABLE OF element_type [NOT NULL]; Example: TYPE employee_type IS TABLE OF NUMBER INDEX BY VARCHAR2(64); Varrays: Holds a fixed number of elements which can be changed in run time They can be declared as: TYPE type_name IS {VARRAY | VARYING ARRAY} (size_limit) OF element_type [NOT NULL]; Example: TYPE Calendar IS VARRAY(366) OF DATE; 


  • Technology problems


    Search Results


    • 1. How can we call DDL statements like CREATE, DROP, TRUNCATE, etc. from PL/SQL?
    • Discuss
    • 2. How can we read and write operating system files from PL/SQL program?
    • Discuss
    • 3. Explain how to debug PL/SQL program.
    • Discuss
    • 4. Both PL/SQL and Java (or) .NET code can be used to create Oracle stored procedures and triggers. Which of the one should be used and why?
    • Discuss
    • 5. SQL vs. PL/SQL
    • Discuss
    • 6. What is a PL/SQL Record data type?
    • Discuss
    • 7. Define cursor attributes: %FOUND, %NOTFOUND, %ROWCOUNT, and %ISOPEN
    • Discuss
    • 8. Explain some of the commonly used Predefined PL/SQL Exceptions.
    • Discuss
    • 9. Explain how PL/SQL exceptions are raised.
    • Discuss
    • 10. What is a PL/SQL package? what are its Advantages ?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment