2011-10-24 9 views
0

「Started At」という名前の列を含むビューがあります。 SELECTステートメントでこれをどのように選択するのですか?特別な名前のOracle select列

ありがとうございました!

答えて

5

は、あなたが(ETC-Z、長さが30文字で始まり、予約語...)Oracle Databaseのスキーマ・オブジェクト名のルールを破ることはできない二重引用符で名前を囲むことによって

SELECT "Started At" 
FROM your_table 
2

で試してみてください。後でオブジェクトにアクセスするには、名前を二重引用符で囲む必要があります。ポイントへの

[email protected]> create table t ("x" int); 

Table created. 

[email protected]> 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' 


[email protected]> select "x" from t; 

no rows selected 

[email protected]> create view v as select * from t; 

View created. 

[email protected]> 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' 


[email protected]> select "x" from v; 

no rows selected 

[email protected]> 
関連する問題