What is the most appropriate data type for storing an IP address in SQL server? [duplicate]
Storing an IPv4 address as a binary(4) is truest to what it represents, and allows for easy subnet mask-style querying. However, it requires conversion in and out if you are actually after a text representation. In that case, you may prefer a string format. A little-used SQL Server function that might help if you are … Read more