database - Storing an IP Address in a Oracle SQL Table -
this question has reply here:
representing ipv4/ipv6 addresses in oracle 6 answersi have created table store ip addresses.
create table ipdetails( ip_address decimal(16,4) not null, vlan_id varchar(50) );
but when seek insert table gives me error :
insert ipdetails values (192.169.165.128, 'sample1')
is there anyway store number lot of decimal places in sql table, if info type should use? please advice.
thanks in advance!
you have several options:
store varchar. ip address isn't number you're math on, why store in numeric format? store in hexidecimal single number. while can't in decimal, in hexidecimal ip 8 digit number. store (up to) 4 separate fields. unnecessary applications (where might want concerned 1 part of ip) useful. sql database oracle ip-address
No comments:
Post a Comment