【发布时间】:2011-10-24 10:28:22
【问题描述】:
我有一个视图,其中包含一个名为“Started At”的列。如何在 SELECT 语句中选择它?
谢谢!
【问题讨论】:
我有一个视图,其中包含一个名为“Started At”的列。如何在 SELECT 语句中选择它?
谢谢!
【问题讨论】:
试试
SELECT "Started At"
FROM your_table
【讨论】:
您可以通过将名称括在双引号中来打破 Oracle 数据库模式对象名称规则(无保留字、以 A-Z 开头、长度为 30 个字符等)。要稍后访问该对象,您必须用双引号将名称括起来。
重点:
me@XE> create table t ("x" int);
Table created.
me@XE> select x from t;
select x from t
*
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_X'
me@XE> select "x" from t;
no rows selected
me@XE> create view v as select * from t;
View created.
me@XE> select x from v;
select x from v
*
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_X'
me@XE> select "x" from v;
no rows selected
me@XE>
【讨论】: