"Ranetbauer, Michael" <[EMAIL PROTECTED]> wrote on 03/03/2004
13:40:00:

> I have a table, that has a primary key with two columns and want to add a
> third column to this primary key.
>
> Is this possible and when yes: Do I have to delete all tables, that

It is possible, and you do not have to delete any tables. You have to drop
the current Primary Key and then add another one. See the ALTER TABLE
command:

ALTER TABLE <table> DROP PRIMARY KEY ;
ALTER TABLE <table> ADD PRIMARY KEY (<col1>, <col2>, <col3>) ;

The primary key has to be rebuilt, which may take some time.

      Alec


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

Reply via email to