Monday, July 15, 2013

PL/SQL Reserved Words and Keywords & Object Max Length

I came across this post when I was having a doubt and searching on the maximum length for objects in Oracle SQL. This is a very mediocre post, more of a copy and paste from the online resources.  

Finally I got the answer that all object names should be from 1 to 30 bytes long with the following exceptions

  • Names of databases are limited to 8 bytes
  • Names of (database) DB links can be as long as 128 bytes


If an identifier includes multiple parts separated by periods, then each attribute can be up to 30 bytes long. Each period separator, as well as any surrounding double quotation marks, counts as one byte. For example, suppose you identify a column like this:

"schema"."table"."column"

The schema name can be 30 bytes, the table name can by 30 bytes, and the column name can be 30 bytes. Each of the quotation marks and periods is a single-byte character, so the total length of the identifier in this example can be up to 98 bytes.

PL/SQL Reserved Words and Keywords
Both reserved words and keywords have special meaning in PL/SQL. The difference between reserved words and keywords is that you cannot use reserved words as identifiers. You can use keywords as as identifiers, but it is not recommended.
Table D-1 lists the PL/SQL reserved words.
Table D-2 lists the PL/SQL keywords.
Some of the words in this appendix are also reserved by SQL. You can display them with the dynamic performance view V$RESERVED_WORDS, which is described in Oracle Database Reference.
Table D-1 PL/SQL Reserved Words
Begins with:Reserved Words
A
ALL, ALTER, AND, ANY, AS, ASC, AT
B
BEGIN, BETWEEN, BY
C
CASE, CHECK, CLUSTER, CLUSTERS, COLAUTH, COLUMNS, COMPRESS, CONNECT, CRASH, CREATE, CURRENT
D
DECLARE, DEFAULT, DELETE, DESC, DISTINCT, DROP
E
ELSE, END, EXCEPTION, EXCLUSIVE, EXISTS
F
FETCH, FOR, FROM
G
GOTO, GRANT, GROUP
H
HAVING
I
IDENTIFIED, IF, IN, INDEX, INDEXES, INSERT, INTERSECT, INTO, IS
L
LIKE, LOCK
M
MINUS, MODE
N
NOCOMPRESS, NOT, NOWAIT, NULL
O
OF, ON, OPTION, OR, ORDER, OVERLAPS
P
PRIOR, PROCEDURE, PUBLIC
R
RESOURCE, REVOKE
S
SELECT, SHARE, SIZE, SQL, START
T
TABAUTH, TABLE, THEN, TO
U
UNION, UNIQUE, UPDATE
V
VALUES, VIEW, VIEWS
W
WHEN, WHERE, WITH
Table D-2 PL/SQL Keywords
Begins with:Keywords
A
A, ADD, AGENT, AGGREGATE, ARRAY, ATTRIBUTE, AUTHID, AVG
B
BFILE_BASE, BINARY, BLOB_BASE, BLOCK, BODY, BOTH, BOUND, BULK, BYTE
C
C, CALL, CALLING, CASCADE, CHAR, CHAR_BASE, CHARACTER, CHARSETFORM, CHARSETID, CHARSET, CLOB_BASE, CLOSE, COLLECT, COMMENT, COMMIT, COMMITTED, COMPILED, CONSTANT, CONSTRUCTOR, CONTEXT, CONTINUE, CONVERT, COUNT, CURSOR, CUSTOMDATUM
D
DANGLING, DATA, DATE, DATE_BASE, DAY, DEFINE, DETERMINISTIC, DOUBLE, DURATION
E
ELEMENT, ELSIF, EMPTY, ESCAPE, EXCEPT, EXCEPTIONS, EXECUTE, EXIT, EXTERNAL
F
FINAL, FIXED, FLOAT, FORALL, FORCE, FUNCTION
G
GENERAL
H
HASH, HEAP, HIDDEN, HOUR
I
IMMEDIATE, INCLUDING, INDICATOR, INDICES, INFINITE, INSTANTIABLE, INT, INTERFACE, INTERVAL, INVALIDATE, ISOLATION
J
JAVA
L
LANGUAGE, LARGE, LEADING, LENGTH, LEVEL, LIBRARY, LIKE2, LIKE4, LIKEC, LIMIT, LIMITED, LOCAL, LONG, LOOP
M
MAP, MAX, MAXLEN, MEMBER, MERGE, MIN, MINUTE, MOD, MODIFY, MONTH, MULTISET
N
NAME, NAN, NATIONAL, NATIVE, NCHAR, NEW, NOCOPY, NUMBER_BASE
O
OBJECT, OCICOLL, OCIDATETIME, OCIDATE, OCIDURATION, OCIINTERVAL, OCILOBLOCATOR, OCINUMBER, OCIRAW, OCIREFCURSOR, OCIREF, OCIROWID, OCISTRING, OCITYPE, ONLY, OPAQUE, OPEN, OPERATOR, ORACLE, ORADATA, ORGANIZATION, ORLANY, ORLVARY, OTHERS, OUT, OVERRIDING
P
PACKAGE, PARALLEL_ENABLE, PARAMETER, PARAMETERS, PARTITION, PASCAL, PIPE, PIPELINED, PRAGMA, PRECISION, PRIVATE
R
RAISE, RANGE, RAW, READ, RECORD, REF, REFERENCE, RELIES_ON, REM, REMAINDER, RENAME, RESULT, RESULT_CACHE, RETURN, RETURNING, REVERSE, ROLLBACK, ROW
S
SAMPLE, SAVE, SAVEPOINT, SB1, SB2, SB4, SECOND, SEGMENT, SELF, SEPARATE, SEQUENCE, SERIALIZABLE, SET, SHORT, SIZE_T, SOME, SPARSE, SQLCODE, SQLDATA, SQLNAME, SQLSTATE, STANDARD, STATIC, STDDEV, STORED, STRING, STRUCT, STYLE, SUBMULTISET, SUBPARTITION, SUBSTITUTABLE, SUBTYPE, SUM, SYNONYM
T
TDO, THE, TIME, TIMESTAMP, TIMEZONE_ABBR, TIMEZONE_HOUR, TIMEZONE_MINUTE, TIMEZONE_REGION, TRAILING, TRANSACTION, TRANSACTIONAL, TRUSTED, TYPE
U
UB1, UB2, UB4, UNDER, UNSIGNED, UNTRUSTED, USE, USING
V
VALIST, VALUE, VARIABLE, VARIANCE, VARRAY, VARYING, VOID
W
WHILE, WORK, WRAPPED, WRITE
Y
YEAR
Z
ZONE


No comments:

Post a Comment

Please add your valuable comments and also questions that would make me write a post for you.

Search This Blog

Labels

oracle oracle applications 11i 12.1 PLSQL SQL database index r12 12 API HRMS PL application r12.1.3 table whitepaper AR DOCUMENT_CATEGORY Database Options Oracle Application Setup Packages Sequences Stand-alone System Profile Options Tables Tuning User-defined types Views autoinvoice compatibility concurrent developer document documents of record download impact import increase issue lookup manager master object names oracle workflow performance receivables script technology windows workflow APP-PAY-06841 ATG BI BLOB DBMS_LOB DFF DIRECTORY Dynamic FND FNDLOAD HR_CHANGE_START_DATE_API IN IN OUT Jdeveloper 11g KFF MIME Materialized views OA Framework OAF ORACLE_LOADER OUT Private synonyms Problem Problem Statement SQL*LOADER SSHR Starters Tutorial WebService XP ad_dd administrator all all workflows amateur architecture assi assignment attachments breadth first search builder category change client column columns compression consideration create create_shared_type custom flexfield cyclic graph data flow data structure data structures depth first search employee external tables field file flex flex field flexfield fnd_irep_classes fnd_irep_function_flavors fnd_lookup_types_pkg fnd_lookup_values_pkg functionality graph image infrastructure insert_row integrated SOA gateway invisible indexes irep jdev jdeveloper key key flexfield keywords latest start date list list of APIs load logging mandatory metalink node noob operating system operational BI package package maximum length parameters patch per_shared_types_api person procedures query queue quick start record registering registration reserved results solution stack standalone start date subcategory technical traverse traversing a graph type update_start_date upload values vertex view vista wf wf_local_roles windows 7

Total Pageviews