Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Reserved SQL word used as column name in a V$ table!
On Tue, 10 Jun 1997 18:54:57 GMT, ben_ryan_at_vancity.com (Ben Ryan) wrote:
[snip]
>describe v$db_pipes
> Name Null? Type
> ------------------------------- -------- ----
> OWNERID NUMBER
> NAME VARCHAR2(1000)
> TYPE VARCHAR2(7)
> SIZE NUMBER
>
>SELECT v$db_pipes.size FROM v$db_pipes;
>ERROR at line 1:
>ORA-01747: invalid user.table.column, table.column, or column
>specification
> *
select "SIZE" from v$db_pipes
will do it. You can always use " (double quotes) to access Identifiers that have mixed case, special characters or are keywords. For example:
SQL> create table foo (
2 " " int,
3 " hi !" int );
Table created.
SQL>
SQL> desc foo
Name Null? Type ------------------------------- -------- ---- NUMBER(38) hi ! NUMBER(38)
SQL>
SQL> insert into foo values ( 5, 5 );
1 row created.
SQL>
SQL> select " " from foo;
5
SQL> select " hi !" from foo;
hi !
5
[snip]
>Ben Ryan - VanCity C.U.
>Vancouver, B.C.
>Canada
>
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
![]() |
![]() |