Seena Blace wrote:

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);



Try this:


create table ipdet
 (IPaddress  varchar (14) not null ,
  hostid  varchar (20) not null,
  IP_DESC  text,
  MAC   text,
  interface text,
  primary key (ipaddress,hostid)
);




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to