Set - 4

Question 21 :

Can a view be updated/inserted/deleted? If Yes - under what conditions?

Answer :

A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible.

Question 22 :

If a view on a single base table is manipulated will the changes be reflected on the base table?

Answer :

If changes are made to the tables and these tables are the base tables of a view, then the changes will be reference on the view.

Question 23 :

Which of the following statements is true about implicit cursors?

Answer :

1. Implicit cursors are used for SQL statements that are not named.
2. Developers should use implicit cursors with great care.
3. Implicit cursors are used in cursor for loops to handle data processing.
4. Implicit cursors are no longer a feature in Oracle.

Question 24 :

Which of the following is not a feature of a cursor FOR loop?

Answer :

1. Record type declaration.
2. Opening and parsing of SQL statements.
3. Fetches records from cursor.
4. Requires exit condition to be defined.

Question 25 :

A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using referential datatypes?

Answer :

1. Use employee.lname%type.
2. Use employee.lname%rowtype.
3. Look up datatype for EMPLOYEE column on LASTNAME table and use that.
4. Declare it to be type LONG.