-
SQL Data Types
Hey all,
I have a database that stores computer specs e.g.
Hard Drive Size (GB)
Memory Size (MB/GB)
Graphics Card Size (MB)
What i'm trying to do is query the database to find for example all hard drives under 80GB....
How would i achieve this, is there a data type that understands the differences between K, KB, MB, GB, TB?
Cheers
-
Re: SQL Data Types
I would store as an integer and store all in byte size. Do the conversion in the application on the way in for storage and when querying the data
-
Re: SQL Data Types
I agree with Gary, but rather than storing the amount of Bytes, store the smallest units you are interested in (which based on your example is MB).
-
Re: SQL Data Types
Cheers guys....It would be handy if there were a data type :P