Oracle Package UTL_INADDR
Role: Used to obtain host names and IP addresses in the LAN or Internet environment.
1. IP address in utl_inaddr.get_host_address environment
Prompt for system error if query fails
Query www.qq.com IP Address
Select Utl_inaddr.get_host_address (' www.qq.com ') from dual;
Querying native IP addresses
Select Utl_inaddr.get_host_address () from dual;
Query the IP address of Yuechu within the LAN
Select Utl_inaddr.get_host_address (' Yuechu ') from dual;
2, Utl_inaddr.get_host_name return the host name in the environment
Returns the native host name
Select Utl_inaddr.get_host_name () from dual;
Returns the host name of the specified IP address within the LAN
Select Utl_inaddr.get_host_name (' 192.168.0.156 ') from dual;
Returns the URL of the specified IP address in intrenet
Select Utl_inaddr.get_host_name (' 219.153.50.84 ') from dual;