Tag: databases

Questions Related to databases

  1. a) A function must return a value.

  2. b) A procedure must return a value.

  3. c) A function executes a PL/SQL statement.

  4. d) A function is invoked as part of an expression.

  5. e) A procedure must have a return data type specify in its declaration.


Correct Option: A,D

CREATE OR REPLACE PROCEDURE find_cpt (v_movie_id {Argument Mode} NUMBER, v_cost_per_ticket {argument mode} NUMBER) IS BEGIN IF v_cost_per_ticket > 8.5 THEN SELECT cost_per_ticket INTO v_cost_per_ticket FROM gross_receipt WHERE movie_id = v_movie_id; END IF; END; Which mode should be used for V_COST_PER_TICKET?

  1. IN OUT

  2. IN

  3. OUT

  4. RETURN


Correct Option: A
  1. a) In the package body.

  2. b) In the data base triggers.

  3. c) In the package specification.

  4. d) In the procedures declare section using the exact name in each.


Correct Option: A
  1. Statement and Row

  2. Statement only

  3. Row only

  4. Oracle Forms trigger


Correct Option: C
  1. a) This statement creates a stored procedure named get_sal.

  2. b) This statement returns a raise amount based on an employee id.

  3. c) This statement creates a stored function named get_sal with a status of invalid.

  4. d) This statement creates a stored function named get_sal.

  5. e) This statement fails.


Correct Option: E
  1. a) The COMMIT and ROLLBACK commands are allowed in the packaged function.

  2. b) You can not use packaged functions in a query statement.

  3. c) The packaged function cannot execute an INSERT, UPDATE, or DELETE statement against the table that is being queried.

  4. d) The packaged function can execute and INSERT, UPDATE, or DELETE statement against the table that is being queried if it is used in a subquery.

  5. e) The packaged function can execute an INSERT, UPDATEM or DELETE statement against the table that is being queried if the pragma RESTRICT REFERENCE is used.


Correct Option: C

Which three are true regarding error propagation? (Choose three)

  1. a) An exception cannot propagate across remote procedure calls.

  2. b) An exception raised inside a declaration immediately propagates to the current block.

  3. c) The use of the RAISE; statement in an exception handler reprises the current exception

  4. d) An exception raised inside an exception handler immediately propagates to the enclosing block.


Correct Option: A,C,D

Which procedure of the dbms_output supply package would you use to append text to the current line of the output buffer?

  1. a) GET.

  2. b) GET_LINE.

  3. c) PUT_TEXT_LINE.

  4. d) PUT_LINE.


Correct Option: D
  1. Manmohan

  2. Sonia Gnadhi

  3. Mujibur Rahman

  4. Obama


Correct Option: B,C