CIT325 chpt 5
Which of the following returns an integer for the current line number in the PL/SQL block (choose all that apply)?
$$PLSQL_LINE
Which of the following conditional compilation statements returns an empty string for an anonymous block and the uppercase name of the function or procedure (choose all that apply)?
$$PLSQL_UNIT
Which of the following are valid cursor attributes (choose all that apply)?
%ROWCOUNT %FOUND %NOTFOUND %ISOPEN
Which pseudo types can you use to inherit from strongly typed variables (choose all that apply)?
%TYPE %rowtype %ROWTYPE %type
Which of the following is/are math operator(s) (choose all that apply)?
- + / **
Which of the following opens a multiple line comment (choose all that applies)?
/*
SELECT column_value AS "Character" FROM TABLE(something('One','Two','Three')) ORDER BY 1; How many rows are returned by the preceding query?
3
Which of the following is the maximum size of a VARCHAR2 data type.
32,767
Which of the following is/are assignment operator(s) (choose all that apply)?
:=
Which of the following is/are comparison operator(s) (choose all that apply)?
< > <=
Which are valid loop structures in PL/SQL (choose all that apply)?
A WHILE loop A FOR loop A simple loop
Which of the following are Data Definition Language (DDL) statements (choose all that apply)?
ALTER CREATE DROP
Which of the following are considered composite variables (choose all that apply)?
Any array data type Any structure data type Any object data type Any object data type
Which of the following are internally stored data types (choose all that apply)?
CLOB NCLOB BLOB
Which of the following isn't an Oracle DML statement (choose all that apply)?
COMMENT REPLACE
Which of the following Oracle Collection API methods are functions (choose all that apply)?
COUNT LAST
Which of the following are composite generalized data types (choose all that apply)?
Collections Records Objects
Which of the following are types of errors that exist in PL/SQL (choose all that apply)?
Compilation errors Run-time errors
Which of the following are the default date masks (choose all that apply)?
DD-MON-RR DD-MON-YYYY
Which of the following are Data Manipulation Language (DML) statements (choose all that apply)?
DELETE INSERT UPDATE SELECT
Which of the following are types of SQL statements (choose all that apply)?
Data Control Language (DCL) Data Manipulation Language (DML) Transaction Control Language (TCL) Data Definition Language (DDL)
Named blocks support which of the following (choose all that apply)?
Declaration blocks Exception handling blocks Execution blocks Functions
Which of the following let you declare a user-defined exception (choose all that apply)?
Declare an EXCEPTION variable and map it to a standard Oracle exception Declare an EXCEPTION variable in the declaration block Declare a run-time exception by using the RAISE_APPLICATION_ERROR function
A declaration block does which of the following (choose all that apply)?
Declare variables Declare functions Declare object types Declare record types Declare constants
Which of the following are varray and table data type states (chose all that apply)?
Empty Populated Null
Which keywords are used in an anonymous block program (choose all that apply)?
End Quit Declare
Which of the following are considered as mandatory block structures in Pl/SQL (choose all that apply)?
Execution block
Which of the following describe the overloaded versions of the Oracle Collection API EXTEND method (choose all that apply)?
Extend one element at a time Extend n elements at a time Extend n elements with a copy of another elements value Extend n elements with a null value
Which of the following are Boolean values (choose all that apply)?
FALSE NULL TRUE
$$PLSQL_TYPE returns an integer for the current line number in the PL/SQL block.
False
As a rule, you use the CHAR and NCHAR data types for most strings because you don't want to allocate unnecessary space for fixed length strings.
False
BFILE is a data type that points to an external file, which limits its maximum size to 2 GB.
False
Literal values are represented by identifiers.
False
PL/SQL replaces SQL.
False
Run-time errors thrown in the declaration or exception block are handled by local exception blocks.
False
The EXCEPTION keyword starts the exception block and the QUIT keyword terminates the program unit.
False
The Oracle Collection API's DELETE method is implemented as a function.
False
The Oracle Collection API's EXISTS method is implemented as a procedure.
False
The PL/SQL exception stack is a last-in, first-out (LIFO) data structure.
False
The concept of a Relational Database Management System is simple.
False
The if-then-else-then-else statement is a single-branching statements.
False
Varray collections are single-dimensional structures that have a maximum number of elements.
False
You can use a negative, positive, or null number as the index value of an associative array.
False
You can't implement Oracle SQL collection data types in SQL or PL/SQL.
False
You can't use anonymous block programs in scripts or nested inside other named program units.
False
You use the SQLERRM function to return error codes over the SQLCODE function.
False
Which of the following statements let you skip the balance of the current iteration in a loop (choose all that apply)?
GOTO CONTINUE
How do you read the back trace of an exception stack?
In a descending range
Which of the following aren't built-in exception management functions (choose all that apply)?
NO_VALUE_NEEDED LOGIN_ERROR
Which of the following is a precompiler instruction (choose all that apply)?
PRAGMA
Which of the following are differences between schema object types and record types (choose all that apply)?
Scope access points Initialization requirements Base types Index values
Which of the following are subtypes of the DATE data type (choose all that apply)?
TIMESTAMP TIMESTAMP WITH LOCAL TIME ZONE TIMESTAMP WITH TIME ZONE
Single branching statements return which of the following affirmative outcomes (choose all that apply)?
TRUE FALSE NULL
Which of the following are considered scalar variables (choose all that apply)?
The NUMBER data type The TIMESTAMP data type The VACHAR2 data type
$$PLSQL_OWNER returns the database user who owns the current program unit, and it is a new predefined inquiry directive with Oracle Database 12c.
True
A CONTINUE statement differs from the GOTO statement because it doesn't direct the program flow to a label.
True
A list is a collection of any number of elements that share the same data type.
True
A selector is a variable, function, or expression that the CASE statement attempts to match in WHEN blocks.
True
Collections that hold other collections are multilevel collections.
True
Errors raised in the execution block are thrown to the local exception block where they are caught and managed.
True
Functions return a value and may be used as the right operand in a right-to-left variable assignments.
True
In the mid-1990s, developers described PL/SQL 2.x programming as a "black art".
True
Metadata is nothing more than a bunch of tables that define what you can store, manipulate, and access in a database.
True
Multiple-branching statements without fall-through are if-then-elsif-then-else statements, and with fall-through they are CASE statements.
True
PL/SQL supports two types of programs: anonymous (or unnamed) block programs and named block programs.
True
PL/SQL was and remains an innovative imperative programming language that supports both event-driven and object-oriented programming.
True
Procedures mimic methods that don't return a value.
True
Run-time errors occur after the program is parsed and literal values are assigned to local variables.
True
SQL collections can exist for scalar data types or SQL UDT elements.
True
SQL stands for Structured Query Language.
True
Scalar variables hold only one thing, such as a number, string, or date.
True
Schema-level subroutines can't access calling scope blocks because they are independently defined blocks.
True
The BINARY_INTEGER data type is identical to PLS_INTEGER and stores integer numbers from -2,147,483,648 to 2,147,483,647 as 32 bits or 4 bytes.
True
The DATE data type is the base type for dates, times, and intervals.
True
The NVARCHAR2 data type is a Unicode equivalent to the VARCHAR2 data type.
True
The NVL statement lets you reduce three-valued logic problems to two-valued logic in conditional statements.
True
The Oracle Collection API's COUNT method is implemented as a function.
True
The Oracle Collection API's EXTEND method is implemented as a procedure.
True
The SQLERRM built-in function returns both error codes and messages.
True
The architecture of a database has only one input interface.
True
The dbms_utility package provides you with the format_error_backtrace function, which generates a stack trace.
True
The declaration block starts with the DECLARE keyword and ends with the BEGIN keyword for anonymous blocks.
True
The most common example of a delimiter is the character string delimiter.
True
The term object-relational model is interchangeable with the term extended-relational model, but Oracle prefers the former term over the latter.
True
There's no compile-time exception when you to assign a four-character string literal to a two-character variable.
True
Two types of PL/SQL errors exists: those that happen at compilation time (also known as syntax errors or compile-time errors) and those that happen at run-time (also known as semantic errors).
True
You can enter single- or multiple-line comments in PL/SQL.
True
You can size a CHAR data type with a value up to 32,767 bytes in length.
True
Which of the following are data types that are dynamically sized strings (choose all that apply)?
VARCHAR2 NVARCHAR2 VARCHAR
Which of the following types of collections work with the Oracle Collection API's LIMIT method (choose all that apply)?
Varray collections that use scalar data types as their base data types
Which of the following is a guard-on-entry loop (choose all that apply)?
a WHILE loop
Oracle also provides you with a UI, known as SQL*Plus, and it writes draft files to a buffer file named which of the following?
afiedt.buf
Which of the following are functions or procedures in the utl_call_stack package (choose all that apply)?
backtrace_depth backtrace_line backtrace_unit
Which of the following are considered to be a lexical unit (choose all that apply)?
comments literals delimiters identifiers
Which of the following functions and procedures belong to the utl_call_stack package (choose all that apply)?
current_edition error_depth format_error_backtrace error_number
PL/SQL was developed with which of the following modeling concepts (choose all that apply)?
exception management static data typing modularity parallel or concurrent processing structured programming
What term describes a collections that holds one or more other collections?
multilevel
Which of the following are conditional statements in programming languages (choose all the apply)?
single-branching statements multiple-branching statements with fall through multiple-branching statements without fall through
Which of the following packages let you manage the execution stack (choose all that apply)?
utility_call_stack dbms_utility