Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: composite primary keys

Re: composite primary keys

From: Mladen Gogala <mgogala_at_yahoo.com>
Date: 09 Oct 2007 10:30:32 GMT
Message-ID: <470b5847$0$1339$834e42db@reader.greatnowhere.com>


On Mon, 08 Oct 2007 08:44:26 -0700, g.mrunalini wrote:

> What is the syntax for composite primary key to a table. The table
> already contains primary key as one column and I need to create
> composite primary key for three other columns in the same table.

CREATE TABLE 'mytable' (
COL1 SMALLINT AUTOINCREMENT,
COL2 CHAR(32),
COL3 FLOAT,
PRIMARY KEY (COL1,COL2))
ENGINE=MyISAM;

-- 
http://www.mladen-gogala.com
Received on Tue Oct 09 2007 - 05:30:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US