What would cause some SSNs to be missing a single digit if the column ssn_num is of type integer?

Viewed 27

What would cause some SSNs to be missing a single digit if the column ssn_num is of type integer? I would have chosen it to be of type String, but curious as to what could cause it to leave out single digit

I tried looking up various scenarios in which SSNs were stored as type int, but didn't really find anything useful

1 Answers

The most common scenario for truncation here would be if the SSN itself begins with a leading 0 - integers in most all modern RDMBS' won't retain information about leading zeroes, as they are mathematically immaterial.

SSNs aren't integers, and shouldn't be stored as such.

Related