0

databases Online Quiz - 97

Description: databases Online Quiz - 97
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

Suppose in the declaration section of a PL/SQL block, you create but do not initialize a NUMBER variable. What will be the initial value of the variable when the block is executed?

  1. 0

  2. NULL

  3. Depends on the scale and precision of the datatype.

  4. Without initialization, a variable cannot be used in the executable section of the block.


Correct Option: B

A user executes a PL/SQL block containing complex data with several update and insert statements using multiple row subqueries and complex inline view. Under which of the following conditions will the database save the change after executing one or more PL/SQL blocks? (Choose two)

  1. When you disconnect from your session abnormally

  2. After PL/SQL block is executed successfully

  3. When you issue TRUNCATE command at SQL prompt

  4. When COMMIT command is issued

  5. When each UPDATE statement is executed


Correct Option: C,D

For an unconditional approach to a particular part of a complex PL/SQL block, which of the following control structures can be used?

  1. If-Then-Else

  2. While loop

  3. GOTO

  4. DECODE


Correct Option: C

You are declaring a variable of data type NUMBER in a PL/SQL block. During the execution of the PL/SQL block, a query returns seven rows, and the next FETCH statement is issued. If the variable was assigned a value by using %ROWCOUNT attribute, which of the following values will be stored in it?

  1. 0

  2. 8

  3. 7

  4. NULL


Correct Option: C

Which of the following statements about an SQL statement are not correct? (Choose two)

  1. SQL statements can be on one or more lines.

  2. Keywords cannot be split across lines.

  3. SQL statements are not case-sensitive, unless indicated.

  4. Keywords can be abbreviated.

  5. Place a slash on the last line in the buffer.

  6. You can use arithmetic operators in any clause of a SQL statement.


Correct Option: C,D

Suppose you have to remove a table. There are several indexes associated with this table. Which among the following would remove all the indexes associated with the table?

  1. DROP INDEX

  2. ALTER TABLE ....... DROP PRIMARY KEY CASCADE

  3. ALTER TABLE ....... DROP CONSTRAINT

  4. DROP TABLE


Correct Option: D

Which of the following are not legal?

  1. DECLARE V_Destination_India Number;

  2. DECLARE V_123, V_213, V_132 Varchar2(10);

  3. DECLARE V_sys Boolean := 1;

  4. DECLARE V_destination_India Number(4);

  5. DECLARE V_Hiredate NOT NULL DATE := '01-JAN-00';


Correct Option: B,C,E

Which three of the following methods make PL/SQL tables easier to use? (Choose three)

  1. EXISTS

  2. SUBSTR

  3. TRIM

  4. FLOOR

  5. COUNT

  6. UPPER


Correct Option: A,C,E

For which of the following tasks would it be most appropriate to use a PL/SQL WHILE loop?

  1. To add six new services to the SERVICE table

  2. To change MACHINE_ID 123456 to 456789 and change all others to 900000

  3. To change MACHINE_ID 123456 to 456789

  4. To add new services to the SERVICE table until finished


Correct Option: D

Examine the statement of correlated subquery in the following cursor declaration. DECLARE CURSOR c1 IS SELECT D1.deptno, D1.loc, E1.Totalemp FROM dept D1, (SELECT deptno, COUNT(*) Totalemp FROM emp GROUP BY deptno) E1 WHERE D1.deptno = E1.deptno AND E1.Totalemp > 6; Why does this statement result in an error?

  1. Parameter has to be used in this cursor to make its execution successful.

  2. Correlated subquery cannot be used in CURSOR declaration.

  3. Correlated FROM clause subquery cannot be used in CURSOR declaration.

  4. AND logical operator cannot be used in WHERE clause of cursor declaration.

  5. No logical error.


Correct Option: E

In which section is a user-defined exception trapped?

  1. Declaration

  2. Execution

  3. Exception

  4. Header


Correct Option: C

Which of the following architecture is used to support the agent or the application tier?

  1. simple

  2. two tier

  3. n tier

  4. client server


Correct Option: C

What is the purpose of SET DBMSSERVER OUTPUT ON

  1. TO PRINT

  2. TO COPY

  3. TO CONVERT

  4. TO SEE THE RESULT OF PL/SQL PROGRAMS ON DISPLAY


Correct Option: D

SQL is a product of ?

  1. ASCII

  2. ANSCI

  3. ORACLE

  4. DBMS


Correct Option: B

How many normalization processes are available in RDBMS

  1. 2

  2. 3

  3. 6

  4. 12


Correct Option: C

How many constraints are available in SQL

  1. 1

  2. 2

  3. 3

  4. 5


Correct Option: D

Auto commit occurs on

  1. On any DML

  2. On any DDL

  3. On both

  4. On none


Correct Option: B

Which component will never allocate memory from the larger pool

  1. Oracle Library Cache

  2. Oracle Parallel Query

  3. Oracle Recovery Manager

  4. Oracle Multithreaded Server


Correct Option: C

What is the main reason to create a reverse key index on a column

  1. The column is populated by sequence

  2. The column contains many different values

  3. The column is mainly used for value range scans

  4. The columns implementing an inverted list attribute.


Correct Option: A

What is the best table to be cached?

  1. Small table rarely retrieved with a full table scan

  2. Large table rarely retrieved with a full table scan

  3. Small table frequently retrieved with a full table scan

  4. Large table frequently retrieved with a full table scan


Correct Option: C
- Hide questions