Oracle 保留字、关键字(v$reserved_words)详解

1、概述

1.1 标识符无效

  • 保留字(reserved = ‘Y’)是不能被用作 列名 的
  • 关键字(reserved = ‘N’)虽然可以用作 列名,但Oracle 并不建议。
SELECT t.reserved FROM v$reserved_words t WHERE t.keyword = 'DESC';

RESERVED
Y

在这里插入图片描述

2、数据字典 v$reserved_words

Oracle 12c - 官方文档 - v$reserved_words 详解

Column Description 理解
KEYWORD Name of the keyword
LENGTH Length of the keyword
RESERVED Indicates whether the keyword cannot be used as an identifier (Y) or whether the keyword is not reserved (N)
RES_TYPE Indicates whether the keyword cannot be used as a type name (Y) or whether the keyword is not reserved (N)
RES_ATTR Indicates whether the keyword cannot be used as an attribute name (Y) or whether the keyword is not reserved (N)
RES_SEMI Indicates whether the keyword is not allowed as an identifier in certain situations, such as in DML (Y) or whether the keyword is not reserved (N)
DUPLICATE Indicates whether the keyword is a duplicate of another keyword (Y) or whether the keyword is not a duplicate (N)
发布了43 篇原创文章 · 获赞 32 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/qq_34745941/article/details/99632820
今日推荐