Home » SQL & PL/SQL » SQL & PL/SQL » unsigned data types
unsigned data types [message #16195] Tue, 16 November 2004 08:35 Go to next message
Ian Moore
Messages: 4
Registered: November 2004
Junior Member
I've searched high and low and still can't find a way to create an unsigned big int in Oracle.  I basically want a field that can hold the biggest possitive integer I can possibly get out of Oracle.  Maybe I have to create my own data type?  Maybe using a varchar with a cast will do it?  I don't know.  If anyone could point me in the right direction, I'd really apreciate it.

Thanks!

-- Ian
Re: unsigned data types [message #16196 is a reply to message #16195] Tue, 16 November 2004 08:48 Go to previous messageGo to next message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Is NUMBER(38) big enough?
----------------------------------------------------------------------
SQL> SET NUMWIDTH 40
SQL> CREATE TABLE t (n NUMBER(38));
 
Table created.
 
SQL> INSERT INTO t VALUES (12345678901234567890123456789012345678);
SQL> SELECT n
  2  FROM   t
  3  /
 
                                       N
----------------------------------------
  12345678901234567890123456789012345678
 
SQL>

----------------------------------------------------------------------
Re: unsigned data types [message #16197 is a reply to message #16195] Tue, 16 November 2004 09:22 Go to previous messageGo to next message
croK
Messages: 170
Registered: April 2002
Senior Member
Max integer number is datatype NUMBER without precision that will default to 38 byte positive integer datatype.

Best luck.
Looking for remote oracle job.....
Re: unsigned data types [message #16199 is a reply to message #16195] Tue, 16 November 2004 09:53 Go to previous message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Read more about Oracle's NUMBER datatype.
Previous Topic: unsigned data types
Next Topic: select truncated hour , but w/o minutes
Goto Forum:
  


Current Time: Mon Aug 04 02:55:06 CDT 2025