Create a unique index of the two fields. Primary key is one column only. That should take care of it.
P -----Seena Blace <[EMAIL PROTECTED]> wrote: ----- To: [EMAIL PROTECTED] From: Seena Blace <[EMAIL PROTECTED]> Date: 02/10/2004 01:25PM Subject: COMPOSITE PRIMARY KEY? Hi, I want to create a table with composite Primary key.How to do that? create table ipdet (IPaddress varchar (14) not null , hostid varchar (20) not null primary key (ipaddress,hostid), IP_DESC text , MAC text, interface text); thx-seena --------------------------------- Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]