Re: SQL Humor

From: JT <>
Date: Fri, 19 Aug 2005 11:07:28 -0400
Message-ID: <#I0lUANpFHA.3380_at_TK2MSFTNGP12.phx.gbl>

And on top of that, specific ranges of the SSN coding scheme are reserved for foreign nationals with working visas. As far as primary keys go, I would trust SQL Server to generate a unique identity before I would trust the Fed to assign a unique SSN. For person tables, just stick SSN in a varchar(20) as an extraneous attribute and use an 4 byte integer identity for foreign key relationships.

<> wrote in message
> Hope you don't mind, but I have some fuzzy thoughts on datatypes, smart
> decisions, column lengths, and maybe the ghost of Y2K. How many DBAs
> use number datatypes to hold Social Security Numbers? How many use
> varchar(9) or char(9)? I always use the latter because the guru once
> told me never to use a numeric datatype if I wasn't going to do the
> math. Now, I wonder. There are about 270,000,000 people in the US of A,
> each with their own unique SSN. Say another 50,000,000 to 100,000,000
> IDs are already accounted for for one reason or another. 10 to the 9th
> is only 1 billion, so nearly half the possible SSNs are used up
> already. Folks, I'm closer to retirement age than whipper-snapper age
> but I believe I could live to see us run out of SSNs unless the Feds do
> something DRASTIC, like add a digit. Then what are we going to do?
> Those who ignored the guru are probably sitting pretty. A BIGINT has
> plenty of room to grow. All those char and varchar tables, however, are
> going to need rewriting. Doesn't that sound familiar?
Received on Fri Aug 19 2005 - 17:07:28 CEST

Original text of this message