How should I store an IP address in SQL Server?
How should I store an IP address in SQL Server?
4 tinyint's gets my vote for an IPv4 address, and I would probably store an IPv6 address in a binary(16).
It depends...
Four tiny INTs, as has been suggested, is a good solution if you will be looking at particular octets and/or doing manipulating/grouping at that level.
A VARCHAR(15) if you are going for plain, basic storage of an IPv4 - including the periods. Best suited for simple inventory.
No one has followed this question yet.