This tutorial describes methods to convert an IP address to an 8 bytes long value, and back, both in C# and T-SQL. Will use methods like ConvertIPToLong() and ConvertLongToIP() to do the job. We will also learn why having IP addresses as long values is more efficient to store and use. Read More