Best way to represent a color in a SQL Database?
问题 If I am using .Net and SQL Server 2008, what is the best way for me to store a color in the database, should I use ToString or convert it to an integer, or something else? Edit: All I want from the colour is to be able to retrieve it and draw something on the screen in the specified colour. I don't need to be able to query against it. 回答1: How are the colors stored natively? If you're just using 0xRRGGBB format, you may as well store it as an integer in the database, and re-hexify it when you