NYCPHP Meetup

NYPHP.org

[nycphp-talk] Primary keys

Kenneth Downs ken at secdat.com
Thu Jul 19 08:56:23 EDT 2007



PaulCheung wrote:
> I want to set up primary keys made up of several fields.

<snip>

> This way I could use ACCOUNT as a primary key or if I so wished I 
> could concatenate NAME and ACCOUNT and use that as primary key. Can 
> concatenated fields be used as a primary key?

Most databases allow a *compound* primary key, so that you specify 
multiple columns as the primary key without concatenating them.  This is 
better than concatenated keys because you can use columns of different 
types.


>
>
>
> Paul
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php


-- 
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com    www.andromeda-project.org
631-689-7200   Fax: 631-689-0527
cell: 631-379-0010




More information about the talk mailing list