List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:May 5 1999 4:26pm
Subject:Re: compound keys?
View as plain text  
Webwork wrote:
> 
> Could someone show me the syntax to alter a table to have a compound
> key?  Thanks, I appreciate it.
> 
> Chuck

Hi Chuck

If you have a table 'tableName' with the fields 'field1', 'field2', 'field3'.
If you want an compound key named 'newKeyName' which spans 'field3' and 'field1', then you
should use this:
ALTER TABLE
	tableName
ADD
	KEY newKeyName (field3,field1)

That's it :)

Tschau
Christian

Thread
compound keys?Webwork5 May
  • Re: compound keys?Christian Mack5 May