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: Martijn Tonies <m.tonies_at_upscene.removethis.com>
Date: Wed, 10 Oct 2007 16:59:47 +0200
Message-ID: <470ce8e2$0$2420$e4fe514c@dreader31.news.xs4all.nl>

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

This won't work on Oracle.

-- 
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
Received on Wed Oct 10 2007 - 09:59:47 CDT

Original text of this message

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