0% found this document useful (0 votes)
25 views4 pages

Dbms-2 1 3

An identifier in PL/SQL is a name given to objects like variables, constants, exceptions, cursors, and programs. Identifiers can be up to 30 characters long and must begin with a letter but can include numbers and symbols. They cannot contain whitespace. Valid identifier names include company_id#, primary_acct_responsibility, and First_Name. Illegal identifier names include 1st_year because it does not begin with a letter, procedure-name because it contains a hyphen, and company ID because it contains whitespace.

Uploaded by

stephen cabiles
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views4 pages

Dbms-2 1 3

An identifier in PL/SQL is a name given to objects like variables, constants, exceptions, cursors, and programs. Identifiers can be up to 30 characters long and must begin with a letter but can include numbers and symbols. They cannot contain whitespace. Valid identifier names include company_id#, primary_acct_responsibility, and First_Name. Illegal identifier names include 1st_year because it does not begin with a letter, procedure-name because it contains a hyphen, and company ID because it contains whitespace.

Uploaded by

stephen cabiles
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Information Sheet 2.1.

Define Identifier in PS/SQL

Learning Objectives:
After reading this INFORMATION SHEET, YOU MUST be able to:
1. Define Identifier in PL/SQL?
2. Know the valid names of identifiers.
3. Illustrates the illegal in PL/SQL.
.

INTRODUCTION

An identifier is the representation within the language of items created by the user, as opposed to language keywords or
commands. Some identifiers stand for dictionary objects, which are the objects you create- such as tables, views,
indexes, columns, and constraints- that are stored in a database. They are called dictionary objects because  Derby stores
information about them in the system tables, sometimes known as a data dictionary. SQL also defines ways to alias these
objects within certain statements.

Identifiers

An identifier is a name for a PL/SQL object, including any of the following:

 Constant or variable

 Exception

 Cursor

 Program name: procedure, function, package, object type, trigger, etc.

 Reserved word

 Label

Default properties of PL/SQL identifiers are summarized below:

 Up to 30 characters in length

 Must start with a letter


 Can include $ (dollar sign), _ (underscore), and # (hash sign)

 Cannot contain any “whitespace” characters

If the only difference between two identifiers is the case of one or more letters, PL/SQL normally treats those two
identifiers as the same.[12] For example, the following identifiers are all considered by PL/SQL to be the same:

lots_of_$MONEY$

LOTS_of_$MONEY$

Date Developed: Document No.ICT313359


Date Revised: Issued by:
Database ASIAN LEARNING WEEK NO:1-2
Management System Developed by: CENTER
(DBMS) Princess J. Adlawan Page 1 of 2
Revision # 00
Lots_of_$Money$

The following strings are valid names of identifiers:

company_id#

primary_acct_responsibility

First_Name

FirstName

address_line1

S123456

The following identifiers are all illegal in PL/SQL:

1st_year -- Doesn't start with a letter

procedure-name -- Contains invalid character "-"

minimum_%_due -- Contains invalid character "%"

maximum_value_exploded_for_detail -- Too long

company ID -- Has embedded whitespace

Identifiers are the handles for objects in your program and one of your chief means of communicating with other
programmers. For this reason, many organizations adopt naming conventions; if your project doesn’t require naming
conventions, you will still want to choose variable names carefully...even if you are the only person who will ever see the
code!

Sources: https://docs.oracle.com/javadb/10.6.2.1/ref/crefsqlj18919.html

Date Developed: Document No.ICT313359


Date Revised: Issued by:
Database ASIAN LEARNING WEEK NO:1-2
Management System Developed by: CENTER
(DBMS) Princess J. Adlawan Page 2 of 2
Revision # 00
DBMS Assessment:

Name:__________________________________ Date: _______________________________

Year and Sec:______________________________ Week No:.____________________________

Directions: Write your answer in the blank.

- List the strings are valid names of identifiers:

1.

2.

3.

4.

5.

- List the identifiers that are all illegal in PL/SQL:

1.

2.

3.

4.

5.

Date Developed: Document No.ICT313359


Date Revised: Issued by:
Database ASIAN LEARNING WEEK NO:1-2
Management System Developed by: CENTER
(DBMS) Princess J. Adlawan Page 3 of 2
Revision # 00
Date Developed: Document No.ICT313359
Date Revised: Issued by:
Database ASIAN LEARNING WEEK NO:1-2
Management System Developed by: CENTER
(DBMS) Princess J. Adlawan Page 4 of 2
Revision # 00

You might also like