Login Form




SQL Questions - 7 Print E-mail

1. Which command displays the SQL command in the SQL buffer, and then executes it ?

RUN

 

2. Explain CONNECT BY PRIOR ?

Retrieves rows in hierarchical order

Example :    select empno, ename from emp where

 

3. 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?

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

 

4. Which procedure can be used to create a customized error message ?

  •  RAISE_ERROR
  •  SQLERRM
  •  RAISE_APPLICATION_ERROR
  •  RAISE_SERVER_ERROR

 

5. Transaction

             Transaction is defined as all changes made to the database between successive commits.

 

6. What is a database link?

Database link is a named path through which a remote database can be accessed.

 

7. If left out, which of the following would cause an infinite loop to occur in a simple loop?

  •  LOOP
  •  END LOOP
  •  IF-THEN
  •  EXIT

 

8. The SELECT INTO Statement is most often used to create backup copies of tables or for archiving records.

SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source
SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source WHERE column_name operator value

 

9. What does preemptive in preemptive multitasking mean ?

Preemptive refers to the fact that each task is alloted fixed time slots and at the end of that time slot the next task is started.

 

10. What happens when rows are found using a FETCH statement

  •  It causes the cursor to close
  •  It causes the cursor to open
  •  It loads the current row values into variables
  •  It creates the variables to hold the current row values