Posted by Erland Sommarskog on 10/12/05 01:03
(dbahooker@hotmail.com) writes:
> no greg im serious
>
> why is it bad advice?
>
> i just dont believe in tables that dont have a single numeric primary
> key.
>
> I'm just too friggin tired to use 'A345FD' as a primary key anymore..
> use INTs or BIGINTs if you want. i would rather use a bigint than a
> varchar any day of the week
>
> but.. i mean.. no keys?
>
> are you drunk?
Greg is usually not drunk when he posts. In fact, I have never felt
any smell of liquor from his posts.
Having a one-column key in all tables is actually a really poor idea.
Typical example: an order has a one-column key, which is an orderid.
But a detail row on a order has a two column key: an orderid and a
row number (or a product id).
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|