When You Need to Store a String of Numbers in a CHAR Column

Sometimes you have to store a string of numbers in a CHAR column. Probably because the string of digits represents an account number or something similar and storing as an INTEGER or BIGINT doesn’t really make sense. The account number could have leading zeros that would be lost if stored as an integer. Parts of the account number could store special information, like positions 2,3 and 4 identify what department an account belongs to and it might be useful to be able to select digit_string[2,4]. There are plenty of reasons to store numerical data in a str…

Auteur : noreply@blogger.com (Andrew Ford)

No comments yet.

Leave a Reply

%d bloggers like this: