RE: Removal of Primary Key in Mysql
On Tue, 5 Nov 2002, Alan McDonald wrote: Date: Tue, 5 Nov 2002 18:49:22 +1100 From: Alan McDonald [EMAIL PROTECTED] To: Eric Frazier [EMAIL PROTECTED], Paul DuBois [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Removal of Primary Key in Mysql Because a primary key is a table property and the index of the key is a property of the primary key. If you want ot drop a primary key you alter the table From an SQL point of view, shouldn't the existing primary key be replaced by another so that each row is ALWAYS uniquely addressable. -Original Message- From: Eric Frazier [mailto:ef;kwinternet.com] Sent: Tuesday, 5 November 2002 15:26 To: Paul DuBois Cc: Uma Shankari T.; [EMAIL PROTECTED] Subject: Re: Removal of Primary Key in Mysql Hi, This is a why questionk, which may be somewhat pointless, but. Why is this under alter table instead of drop index? Thanks, Eric At 01:10 AM 11/5/02 -0600, Paul DuBois wrote: At 12:08 +0530 11/5/02, Uma Shankari T. wrote: Hello, I have set one of my field in the mysql table as primary key..no i want to remove that primary key setting in mysql..Can anyone please tell me how to do that ??? Regards, Uma ALTER TABLE tbl_name DROP PRIMARY KEY; - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php (250) 655 - 9513 (PST Time Zone) Inquiry is fatal to certainty. -- Will Durant - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Sincerely, William Mussatto, Senior Systems Engineer CyberStrategies, Inc ph. 909-920-9154 ext. 27 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Removal of Primary Key in Mysql
William R. Mussatto wrote: From an SQL point of view, shouldn't the existing primary key be replaced by another so that each row is ALWAYS uniquely addressable. Unique addressability is something that is not an inate property of all SQL tables; only ones that have UNIQUE or PRIMARY keys, so its not 'wrong' for a unique key to not exist while the table is in flux. If you want it to be wrong, simply wrap the operation in a transaction or possibly lock the table, although I'm not sure either of these actually applies to ALTERing the table (but they should, IMHO). -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Removal of Primary Key in Mysql
At 23:26 -0500 11/4/02, Eric Frazier wrote: Hi, This is a why questionk, which may be somewhat pointless, but. Why is this under alter table instead of drop index? Because DROP INDEX cannot be used to drop a PRIMARY KEY. Just like CREATE INDEX cannot be used to create a PRIMARY KEY. Thanks, Eric At 01:10 AM 11/5/02 -0600, Paul DuBois wrote: At 12:08 +0530 11/5/02, Uma Shankari T. wrote: Hello, I have set one of my field in the mysql table as primary key..no i want to remove that primary key setting in mysql..Can anyone please tell me how to do that ??? Regards, Uma ALTER TABLE tbl_name DROP PRIMARY KEY; - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Removal of Primary Key in Mysql
Hello, I have set one of my field in the mysql table as primary key..no i want to remove that primary key setting in mysql..Can anyone please tell me how to do that ??? Regards, Uma - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Removal of Primary Key in Mysql
At 12:08 +0530 11/5/02, Uma Shankari T. wrote: Hello, I have set one of my field in the mysql table as primary key..no i want to remove that primary key setting in mysql..Can anyone please tell me how to do that ??? Regards, Uma ALTER TABLE tbl_name DROP PRIMARY KEY; - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Removal of Primary Key in Mysql
Hi, This is a why questionk, which may be somewhat pointless, but. Why is this under alter table instead of drop index? Thanks, Eric At 01:10 AM 11/5/02 -0600, Paul DuBois wrote: At 12:08 +0530 11/5/02, Uma Shankari T. wrote: Hello, I have set one of my field in the mysql table as primary key..no i want to remove that primary key setting in mysql..Can anyone please tell me how to do that ??? Regards, Uma ALTER TABLE tbl_name DROP PRIMARY KEY; - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php (250) 655 - 9513 (PST Time Zone) Inquiry is fatal to certainty. -- Will Durant - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Removal of Primary Key in Mysql
Because a primary key is a table property and the index of the key is a property of the primary key. If you want ot drop a primary key you alter the table -Original Message- From: Eric Frazier [mailto:ef;kwinternet.com] Sent: Tuesday, 5 November 2002 15:26 To: Paul DuBois Cc: Uma Shankari T.; [EMAIL PROTECTED] Subject: Re: Removal of Primary Key in Mysql Hi, This is a why questionk, which may be somewhat pointless, but. Why is this under alter table instead of drop index? Thanks, Eric At 01:10 AM 11/5/02 -0600, Paul DuBois wrote: At 12:08 +0530 11/5/02, Uma Shankari T. wrote: Hello, I have set one of my field in the mysql table as primary key..no i want to remove that primary key setting in mysql..Can anyone please tell me how to do that ??? Regards, Uma ALTER TABLE tbl_name DROP PRIMARY KEY; - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php (250) 655 - 9513 (PST Time Zone) Inquiry is fatal to certainty. -- Will Durant - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php