Which of the following is not true about the PL SQL data structure Varray?

Which of the following is not true about PL SQL data structure Varray?

Q 13 – Which of the following is not true about the PL/SQL data structure VARRAY? A – In oracle environment, the starting index for VARRAYs is always 1. B – You can initialize the VARRAY elements using the constructor method of the VARRAY type, which has the same name as the VARRAY.

Which of the following is true about PL SQL?

Q 3 – Which of the following is true about the PL/SQL language? A – PL/SQL provides access to predefined SQL packages. B – PL/SQL provides support for Object-Oriented Programming. C – PL/SQL provides support for Developing Web Applications and Server Pages.

Which of the following is not true about PL SQL nested table?

Which of the following is not true about PL/SQL nested tables? Nested table is similar to declaration of an index-by table along with INDEX BY clause. A nested table can be stored in a database column. Elements of a nested table could be a %ROWTYPE of any database table.

THIS IS IMPORTANT:  What are different data types in MySQL explain?

What is true about PL SQL exceptions?

An error occurs during the program execution is called Exception in PL/SQL. PL/SQL facilitates programmers to catch such conditions using exception block in the program and an appropriate action is taken against the error condition. There are two type of exceptions: … User-defined Exceptions.

Which is an example of a PL SQL subprogram?

Subprogram Invocations

A procedure invocation is a PL/SQL statement. For example: raise_salary(employee_id, amount); A function invocation is an expression.

What is the purpose of triggers?

Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. Each trigger is attached to a single, specified table in the database. Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at the database level.

What is PL SQL and what are advantages of it?

PL/SQL allows sending an entire block of statements to the database at one time. This reduces network traffic and provides high performance for the applications. PL/SQL gives high productivity to programmers as it can query, transform, and update data in a database.

Which of the following is a PL SQL collection types?

PL/SQL – Collections

  • Index-by tables or Associative array.
  • Nested table.
  • Variable-size array or Varray.

How does an execution block start and end in PL SQL?

A PL/SQL block has an executable section. An executable section starts with the keyword BEGIN and ends with the keyword END . The executable section must have a least one executable statement, even if it is the NULL statement which does nothing.

THIS IS IMPORTANT:  Is PHP 7 4 backwards compatible?

What is the best method to access element of Varray?

To access the data elements stored in a varray type variable, we use the syntax variable_name(index) where index starts from 1 for the first element and goes upto the current upper bound of elements which means the number of elements that exists at that given point(not the maximum size of the array).

Which error occurs while program is running and Cannot be detected by PL SQL compiler?

A syntax error can be detected by the PL/SQL compiler. A runtime error occurs while the program is running and cannot be detected by the PL/SQL compiler.

How many types of exceptions are there in PL SQL?

Exception types

There are three types of exceptions: Predefined exceptions are error conditions that are defined by PL/SQL. Non-predefined exceptions include any standard TimesTen errors. User-defined exceptions are exceptions specific to your application.

How do you handle exceptions in PL SQL?

PL/SQL allows you to define your own exceptions according to the need of your program. A user-defined exception must be declared and then raised explicitly, using either a RAISE statement or the procedure DBMS_STANDARD. RAISE_APPLICATION_ERROR.

How do you catch errors in PL SQL?

For example, PL/SQL raises the predefined exception NO_DATA_FOUND if a SELECT INTO statement returns no rows.

Predefined PL/SQL Exceptions.

Exception Oracle Error SQLCODE Value
LOGIN_DENIED ORA-01017 -1017
NO_DATA_FOUND ORA-01403 +100
NOT_LOGGED_ON ORA-01012 -1012
Categories BD