mysql primary key id debate

Ross Werner ross at
Thu Dec 29 16:55:27 MST 2005

On Thu, 29 Dec 2005, Jeff Schroeder wrote:
> Personally, I always have a column in each table called "id", and then
> if I'm using it as a foreign key in another table, I reference it as,
> e.g., "client_id".

I do the same thing. I like it because in joins I can do:
SELECT * FROM client,foo WHERE

SELECT * FROM client,foo WHERE client.client_id=foo.client_id

just grates on my nerves. (I hate the "client.client_id". Yuck.)

 	~ Ross

More information about the PLUG mailing list