Reserved keywords in Oracle

Source: Internet
Author: User
Oracle official documentation Description: ReservedwordsandkeywordsareidentifiersthathavespecialmeaninginPLSQL. Youcannotuserese

Oracle official documentation Description: Reserved words and keywordsare identifiers that have special meaning in PL/SQL. You cannot use rese

Oracle official documentation:

Reserved words and keywordsare identifiers that have special meaning in PL/SQL.

You cannot use reserved words as ordinary user-defined identifiers. you can use them as quoted user-defined identifiers, but it is not recommended. for more information, see "QuotedUser-Defined Identifiers ".

You can use keywords as ordinary user-defined identifiers, but it is not recommended.

Reserved Words cannot be used as User-Defined variables. However, you can add double quotation marks, but do not store them.

Keywords can be used as User-Defined variables without being pushed.

For example:

(1) Reserved Words

-- Number

Create a table as the field name.

SQL> CREATE TABLE cux_oyj_RESERVED_WORDS (NUMBER );

Create table cux_oyj_RESERVED_WORDS (NUMBER)

ORA-00904: The identifier is invalid.

You can add double quotation marks

SQL> CREATE TABLE cux_oyj_RESERVED_WORDS ("NUMBER" NUMBER );

Table created

But query:

SQL> SELECT rw. number from cux_oyj_RESERVED_WORDS rw;

SELECT rw. number from cux_oyj_RESERVED_WORDS rw

ORA-01747: user. table. column, table. column or column description invalid

It is troublesome to use.

(2) KEYWORDS

-- Name

Create a table as the field name.

SQL> CREATE TABLE cux_oyj_KEYWORDS (NAME VARCHAR2 (50 ));

Table created

View of Reserved Words and keywords (Dynamic View) V $ RESERVED_WORDS

This view gives a list of all SQL keywords. To determine whether a participant keyword is reserved in any way, check the RESERVED, RES_TYPE, RES_ATTR, and RES_SEMI columns.

ColumnDatatypeDescription

KEYWORDVARCHAR2 (30) Name of the keyword

LENGTHNUMBERLength of the keyword

RESERVEDVARCHAR2 (1) A value of Y means that the keyword cannot be used as an identifier. A value of N means that it is not reserved.

RES_TYPEVARCHAR2 (1) A value of Y means that the keyword cannot be used as a type name. A value of N means that it is not reserved.

RES_ATTRVARCHAR2 (1) A value of Y means that the keyword cannot be used as an attribute name. A value of N means that it is not reserved.

RES_SEMIVARCHAR2 (1) A value of Y means that the keyword is not allowed as an identifier in certain situations, such as in DML. A value of N means that it is not reserved.

DUPLICATEVARCHAR2 (1) A value of Y means that the keyword is a duplicate of another keyword. A value of N means that it is not a duplicate.

Reserved Words:

Begins with: Reserved Words

A

ALL, ALTER, AND, ANY, AS, ASC,

B

BEGIN, BETWEEN,

C

CASE, CHECK, CLUSTERS, CLUSTER, COLAUTH, COLUMNS, COMPRESS, CONNECT, CRASH, CREATE, CURSOR

D

DECLARE, DEFAULT, DESC, DISTINCT, DROP

E

ELSE, END, EXCEPTION, EXCLUSIVE

F

FETCH, FOR, FROM, FUNCTION

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

PROCEDURE, PUBLIC

R

RESOURCE, REVOKE

S

SELECT, SHARE, SIZE, SQL, START, SUBTYPE

T

TABAUTH, TABLE, THEN, TO, TYPE

U

UNION, UNIQUE, UPDATE

V

VALUES, VIEW, VIEWS

W

WHEN, WHERE,

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, CHARSET, CHARSETFORM, CHARSETID, CLOB_BASE, CLOSE, COLLECT, COMMENT, COMMIT, COMMITTED, COMPILED, CONSTANT, CONSTRUCTOR, CONTEXT, CONTINUE, CONVERT, COUNT, CURRENT, CUSTOMDATUM

D

DANGLING, DATA, DATE, DATE_BASE, DAY, DEFINE, DELETE, DETERMINISTIC, DOUBLE, DURATION

E

ELEMENT, ELSIF, EMPTY, ESCAPE, escape t, EXCEPTIONS, EXECUTE, EXISTS, EXIT, EXTERNAL

F

FINAL, FIXED, FLOAT, FORALL, FORCE

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, OCIDATE, OCIDATETIME, OCIDURATION, OCIINTERVAL, interval, OCINUMBER, OCIRAW, OCIREF, region, OCIROWID, OCISTRING, OCITYPE, OLD, ONLY, OPAQUE, OPEN, OPERATOR, ORACLE, ORADATA, ORGANIZATION, ORLANY, ORLVARY, OTHERS, OUT, OVERRIDING

P

PACKAGE, PARALLEL_ENABLE, PARAMETER, PARAMETERS, PARENT, PARTITION, PASCAL, PIPE, PIPELINED, PRAGMA, PRECISION, PRIOR, PRIVATE

R

RAISE, RANGE, RAW, READ, RECORD, REF, REFERENCE, RELIES_ON, REM, REMAINDER, RENAME, RESULT, RESULT_CACHE, RETURN, RETURNING, REVERSE, ROLLBACK, ROW

S

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.