Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Vocabulary
Identify the vocabulary word for each definition below:
Try It / Solve It
1. Fill in the blanks.
3. Examine the following anonymous block and choose the appropriate statement.
DECLARE
fname VARCHAR2(25);
lname VARCHAR2(25) DEFAULT 'fernandez';
BEGIN
DBMS_OUTPUT.PUT_LINE(fname || ' ' || lname);
END;
4. In Application Express:
DECLARE
v_length_of_string INTEGER;
BEGIN
v_length_of_string := num_characters('Oracle Corporation');
DBMS_OUTPUT.PUT_LINE(v_length_of_string);
Success
END; 18
4
5. Write an anonymous block that uses a country name as input and prints the highest and lowest
elevations for that country. Use the COUNTRIES table. Execute your block three times using Unit-
ed States of America, French Republic, and Japan.
Practice Activities
Vocabulary
Identify the vocabulary word for each definition below:
Literals An explicit numeric, character string, date, or Boolean value that is not
represented by an identifier.
Delimiters
Symbols that have special meaning to an Oracle database.
Reserved Words Words that have special meaning to an Oracle database and cannot
be used as identifiers.
Comments Describe the purpose and use of each code segment and are ignored
by PL/SQL.
Lexical Units Building blocks of any PL/SQL block and are sequences of characters
including letters, digits, tabs, returns, and symbols.
Identifiers
A name, up to 30 characters in length, given to a PL/SQL object.
2
Valid Invalid
Identifier Why Invalid?
(X) (X)
x
Today
x Contain a Space
Last name
x
NUMBER#
x Contain a number
Number1to7
create Y
make N
table Y
seat N
alter Y
rename Y
row N
number N
web N
3
3. What kind of lexical unit (for example Reserved word, Delimiter, Literal, Comment) is each of the
following?
Value Lexical Unit
Reserved Word
SELECT
Delimiter
:=
Literal
'TEST'
Literal
FALSE
Comment
-- new process
Reserved Word
FROM
est elevation */
Literal
v_test
Literal
4.09
Practice Activities
Vocabulary
Identify the vocabulary word for each definition below:
Hold values, called locators, that specify the location of large objects
(such as graphic images) that are stored out of line.
Try It / Solve It
1. In your own words, describe what a data type is and explain why it is important.
3. Identify three data types covered in the Database Programming with SQL course.
4. What data type can be used in PL/SQL, but can’t be used to define a table column?
5. Which data type indicates a large data object that is stored outside of the database?
6. Identify the data type category (LOB, Scalar, or Composite) for each data type. Each category may
be used more than once.
CLOB
VARCHAR2
BLOB
NUMBER
BFILE
TIMESTAMP
NCLOB
RECORD
PLS_INTEGER
LONG
TABLE
BOOLEAN
3
7. Enter the data type category and the data type for each value. The first one has been done for
you.
Text of a resume
100.20
A picture
1053
11-Jun-2016
Index Last_name
1 'Newman'
2 'Raman'
3 'Han'
A movie
A sound byte
FALSE