Lab 13.1 Self-Review Questions


In order to test your progress, you should be able to answer the following questions.

1)

What are the distinguishing characteristics that make functions different from procedures? (check all that apply)

  1. _____ Functions require a PRAGMA RESTRICT clause.

  2. _____ Functions only take IN parameters.

  3. _____ Functions are stored in the database.

  4. _____ Functions require a return value.

2)

The parameters of a function must be labeled IN or the function will not compile successfully.

  1. _____ True

  2. _____ False

3)

Which statement(s) will cause control to return to the calling environment in a function? (check all that apply)

  1. _____ The raising of an exception

  2. _____ The initialization of an OUT parameter

  3. _____ Writing to a database table

  4. _____ The RETURN statement

4)

IN OUT parameters are permissible in functions.

  1. _____ True

  2. _____ False

  3. _____ The function will compile with an IN OUT parameter, but it is not advisable to use them.

5)

If a function declares a user -defined exception but never explicitly raises the exception, which of the following will be true?

  1. _____ The function will not be able to compile.

  2. _____ The function will fail a purity level check.

  3. _____ The exception will never be raised.

  4. _____ As long as the exception has a RETURN clause, there is no error in having a user-defined exception and not calling it.


Answers appear in Appendix A, Section 13.1 .



Oracle PL[s]SQL by Example
Oracle PL[s]SQL by Example
ISBN: 3642256902
EAN: N/A
Year: 2003
Pages: 289

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net