SQL中#的意义是什么?
我有以下代码在 Oracle 中创建对象类型(PL??)
CREATE OR REPLACE TYPE STAFF_T as OBJECT(Staff_ID# NUMBER, Person PERSON_T); \
我想知道声明中 Staff_ID 变量附加的 # 有何意义?
I have the following code to create an object type in Oracle (PL??)
CREATE OR REPLACE TYPE STAFF_T as OBJECT(Staff_ID# NUMBER, Person PERSON_T); \
I'd like to know what is the significance of the # appended to the Staff_ID variable in the declaration?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
没有什么特殊意义。
Oracle 允许在标识符中使用
$
、_
和#
,就像任何其他字母数字字符一样,但标识符应以字母字符(a信)。No special meaning.
Oracle allows using
$
,_
and#
in identifiers, just like any other alphanumeric characters, but the identifier should begin with an alpha character (a letter).这是列名称
Staff_ID#
的一部分。井号是 PL/SQL 中标识符(表/列名)的允许部分。请参阅此处That's part of the column name
Staff_ID#
. The pound sign is an allowable part of an identifier (table/column name) in PL/SQL. See here无论谁编写了代码,# 可能并没有什么特殊含义。
但 # 显然对 Oracle 来说意味着什么,尽管我不知道是什么。来自 SQL 语言参考:
以下是对警告内容的一些猜测:
警告至少返回到 Oracle
7)
在未来的版本中它会是
并非在 Oracle 支持的所有键盘、字符集或平台上都可用。
数据字典大量使用数字符号,据我所知,它对于用户对象来说工作得很好。但为了安全起见,您可能需要将其删除。
Whoever wrote the code probably didn't mean anything special by #.
But # apparently means something to Oracle, although I don't know what. From the SQL Language Reference:
Here are some guesses for what the warning is about:
warning goes back to at least Oracle
7)
it in a future verison
isn't available on all keyboards, character sets, or platforms that Oracle supports
The data dictionary uses the number sign a lot, and as far as I can tell it works just fine for user objects. But just to be safe you might want to remove it.