Using PL/SQL Packages - questions and answers
1) PL/SQL packages are schema objects that group logically related PL/SQL types, variables and subprograms.A) True
B) False
View Answer / Hide Answer2) A package will have which of these mandatory parts?A) Package specification
B) Package body or definition
C) Both A & B
D) None of the above
View Answer / Hide Answer3) Which collection method Returns the index number that precedes index n in a collection?A) PRIOR(n)
B) LAST
C) LIMIT
D) COUNT
View Answer / Hide Answer4) Which internal exception is raised when a program references a nested table or varray element using an index number larger than the number of elements in the collection.A) NO_DATA_FOUND
B) COLLECTION_IS_NULL
C) SUBSCRIPT_OUTSIDE_LIMIT
D) SUBSCRIPT_BEYOND_COUNT
View Answer / Hide AnswerANSWER: D) SUBSCRIPT_BEYOND_COUNT
5) Any subprogram not in the package specification but coded in the package body is called a ___________ . A) Public object
B) Private object
C) Both A & B
D) None of the above
View Answer / Hide AnswerANSWER: B) Private object
6) WRAP command is used to encrypt a PL/SQL application.A) True
B) False
View Answer / Hide Answer7) Which of the following is not a schema object?A) Packages
B) Indexes
C) Public Synonyms
D) Triggers
View Answer / Hide AnswerANSWER: C) Public Synonyms
8) You can pass parameters to procedures or functions in a package.A) True
B) False
View Answer / Hide Answer9) The constructs of a procedure, function or a package are ________ . A) Variables and Constants
B) Cursors
C) Exceptions
D) All mentioned above
View Answer / Hide AnswerANSWER: D) All mentioned above
10) A package cursor is a cursor which you declare in the package specification without an SQL statement.A) Yes
B) No
View Answer / Hide Answer11) Which Package lets you use database triggers to alert an application when specific database values change?A) DBMS_OUTPUT
B) DBMS_ALERT
C) DBMS_PIPE
D) All mentioned above
View Answer / Hide Answer12) Packages HTF and HTP allow your PL/SQL programs to generate HTML tags.A) True
B) False
View Answer / Hide Answer13) Which package lets PL/SQL programs read and write operating system (OS) text files?A) UTL_HTTP
B) UTL_FILE
C) UTL_SMTP
D) None of the above
View Answer / Hide Answer14) Abbreviate SMTP?A) Single Mail Transaction Protocol
B) Simple Mail Transfer Protocol
C) Simple Mail Transaction Protocol
D) Simple Mail Transfer Package
View Answer / Hide AnswerANSWER: B) Simple Mail Transfer Protocol
15) Which of the following are the advantages of PL/SQL Packages?A) Modularity
B) Easier Application Design
C) Information Hiding
D) Added Functionality,Better Performance
E) All mentioned above
F) None of the above
View Answer / Hide AnswerANSWER: E) All mentioned above