Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: storing IP addresses
Jerry Gitomer wrote:
>
> Hi Sam,
>
> You should look this up in a book or TCP/IP FAQ, but what difference
> does it make if a valid IP address begins with 0?
>
> If you application permits it just define the IP address as
> VARCHAR2(15). If the IP address is shorter Oracle will compress it. For
> subsequent processing you can use Oracle's string manipulation functions to
> extract the four pieces of the IP address so that you can operate on them.
> What is probably a better alternative is to store the IP address as four
> separate entities. in which case you can operate on each one independently
> and if necessary can "join" them into the IP address through the use of the
> concatenation operator on the output.
>
> regards
>
> Jerry Gitomer
Yes. You'll just have remember to alter the datatype before you start logging 128-bit IPv6 addresses. Good luck. Received on Thu Jun 03 1999 - 14:44:37 CDT