Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select constant.field
"Arto Viitanen" <arto.viitanen_at_csc.fi> wrote in message
news:43d7208f$0$10074$ba624cd0_at_newsread.funet.fi...
> Mark C. Stock wrote:
>> bottom line '1.' is a numeric expression -- the text (quoted or not) >> after the decimal is being interpreted as a column alias (which you'll >> notice if you take a close look at you output in SQL*Plus) >> >> i.e. >> >> SQL> select 1xxx from dual; >> >> XXX >> ---------- >> 1 >> >> ++ mcs >> >> >
>
bottom line is that both are a type of logical syntax error (just like SELECT EMPNO ENAME, SAL FROM EMP is a syntax error that returns 2 colums when 3 are expected)
but, what indicates to you that one is an integer and one is a floating point? they look identical to me:
SQL> select q.*, dump(xxx), dump("xxx")
2 from (
3 select
4 1.xxx
5 ,1."xxx"
6 from dual
7 ) q
8 /
XXX xxx
---------- ----------
DUMP(XXX)
1 1
Typ=2 Len=2: 193,2
Typ=2 Len=2: 193,2
SQL> create table xxx as
2 select
3 1.xxx
4 ,1."xxx"
5 from dual
6 /
Table created.
SQL> descr xxx
Name Null? Type
![]() |
![]() |