I'm trying to create an unsigned short data type in SQL Server, but so far all I've managed is to get it to not allow any negative values, which wastes half of my storage space. There should be some way to create a custom data type where I manage it myself. I'd like to be able to tell the system that the data type has two bytes, and to read the value back in a certain way so that it reads it as a ushort. Any ideas?
Final Solution:
Ok, Nathan's answer below helped me to find a workable solution. So when I store my unsigned short value to the database, I just need to cast it as a signed short. The first half of the values will be correct. If the value is negative, I just need to add 65536 to the number. The final select case looks like:
SELECT case when i >= 0 then i else 65536+i end
FROM MyDatabase.dbo.testDB
This will properly display my incorrectly cast unsigned short. Thanks for the help.