Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Char Cast to Numeric ?

Char Cast to Numeric ?

From: Buck Turgidson <jc_va_at_hotmail.com>
Date: 25 Sep 2001 10:24:47 -0700
Message-ID: <f98999c8.0109250924.76c55760@posting.google.com>


I am wondering if someone can tell me why the following select statement works against a numeric column, both with the 6 as a number and as a char ('6')?

Connected to:
Oracle7 Server Release 7.3.4.3.0 - Production With the distributed, replication and parallel query options PL/SQL Release 2.3.4.3.0 - Production

SQL> create table temp_01 (sequence_nbr number)   2 /

Table created.

SQL>
SQL> insert into temp_01
  2 select rownum
  3 from user_objects
  4 where rownum < 10
  5 /

9 rows created.

SQL> 
SQL> 
SQL> select * from temp_01

  2 where sequence_nbr = 6
  3 /

SEQUENCE_NBR


           6

SQL>
SQL> select * from temp_01
  2 where sequence_nbr = '6'
  3 /

SEQUENCE_NBR


           6 Received on Tue Sep 25 2001 - 12:24:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US