If CUSIP is defined as
A CUSIP is a 9-character alphanumeric code which identifies a North American financial security for the purposes of facilitating clearing and settlement of trades.
then what type should I set it as in my SQL Server database? Are there any considerations I need to take into account?
If I understand correctly, it’s a fixed-length, right? Always 9 characters – never more, never less?
In that case, I’d use
CHAR(9)since using aVARCHARwith a variable-length doesn’t benefit you anything, and it carries some overhead. And since it’s a North American standard, I doubt you’ll have to enter Cyrillic, Arab, Hebrew or Far Eastern characters, soCHAR(non-Unicode, 1 byte per character) should be sufficient.The fact that it’s an alphanumeric code rules out all the numerical datatypes right away.