Re: Changing the primary key

2004-03-03 Thread Daniel Clark
You can ALTER TABLE http://www.mysql.com/doc/en/ALTER_TABLE.html > I´'m new with mysql and have following question: > > 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,

Re: Changing the primary key

2004-03-03 Thread Victoria Reznichenko
"Ranetbauer, Michael" <[EMAIL PROTECTED]> wrote: > Hi! > > At first thanks for your help. > > Now I can change the PRIMARY KEY of the table, but now I have a new > question: > > How can I change the FOREIGN KEYS? > You can drop old FOREIGN KEY with ALTER TABLE .. DROP FOREIGN KEY statement:

Re: Changing the primary key

2004-03-03 Thread Alec . Cawley
"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

Re: Changing the primary key

2004-03-03 Thread Victoria Reznichenko
"Ranetbauer, Michael" <[EMAIL PROTECTED]> wrote: > Hi Richard > > At first, thank you for your answer. > > I've tried your solution, but when I try to drop the PRIMARY KEY I get > following error: > > [localhost] ERROR 1025: Error on rename of '.\austro\#sql-280_110' to > '.\austro\fluege' (errn

AW: Changing the primary key

2004-03-03 Thread Ranetbauer, Michael
Hi! At first thanks for your help. Now I can change the PRIMARY KEY of the table, but now I have a new question: How can I change the FOREIGN KEYS? Best regards Michael R. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/

RE: Changing the primary key

2004-03-03 Thread Boyd E. Hemphill
well preserved body, but rather a skid in broadside, thoroughly used, totally worn, and loudly proclaiming: "WOW! What a ride!" -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 7:53 AM To: [EMAIL PROTECTED] Subject: Re: Changing the pri

AW: Changing the primary key

2004-03-03 Thread Ranetbauer, Michael
Hi Richard At first, thank you for your answer. I've tried your solution, but when I try to drop the PRIMARY KEY I get following error: [localhost] ERROR 1025: Error on rename of '.\austro\#sql-280_110' to '.\austro\fluege' (errno: 150) Best regards Michael R. -- MySQL General Mailing List F

Re: Changing the primary key

2004-03-03 Thread Richard Davey
Hello Michael, Wednesday, March 3, 2004, 1:40:00 PM, you wrote: RM> I have a table, that has a primary key with two columns and want to add a RM> third column to this primary key. RM> Is this possible and when yes: Do I have to delete all tables, that RM> reference to this table? No, you don't

Changing the primary key

2004-03-03 Thread Ranetbauer, Michael
Hi I´'m new with mysql and have following question: 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 reference to this table? Best regards Michael R.