Re: Alter table help
From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 05/06/04
- Next message: Louis Davidson: "Re: Deadlock on SBS2003"
- Previous message: Dazed and Confused: "Why use "N""
- In reply to: Adam Machanic: "Re: Alter table help"
- Next in thread: Adam Machanic: "Re: Alter table help"
- Reply: Adam Machanic: "Re: Alter table help"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 10:00:28 -0500
And don't forget the most important thing once you have dropped the
constraint, and possibly the column:
alter table table_name add constraint constraint_name primary key
(different_column_name)
:)
-- ---------------------------------------------------------------------------- Louis Davidson (drsql@hotmail.com) Compass Technology Management Pro SQL Server 2000 Database Design http://www.apress.com/book/bookDisplay.html?bID=266 Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies will be ignored :) "Adam Machanic" <amachanic@air-worldwide.nospamallowed.com> wrote in message news:e5TtTM3MEHA.3988@TK2MSFTNGP09.phx.gbl... > If by "get rid of it" you mean the constraint: > > ALTER TABLE table_name DROP CONSTRAINT constraint_name > > or if you mean the column itself (assuming it's not a compound key): > > ALTER TABLE table_name DROP COLUMN column_name > > > "Tom Pennington" <NONEt2pennington@comcast.net> wrote in message > news:%23W6IzH3MEHA.2488@TK2MSFTNGP10.phx.gbl... > > Okay, I'm trying to modify a tables primary key, actually, I'm trying to > get > > rid of it. According to everything I've read, this is the correct syntax, > > but it won't work. > > > > I'm using the following statement: ALTER TABLE table_name DROP PRIMARY > KEY; > > > > Any ideas? > > > > Tom > > > > > >
- Next message: Louis Davidson: "Re: Deadlock on SBS2003"
- Previous message: Dazed and Confused: "Why use "N""
- In reply to: Adam Machanic: "Re: Alter table help"
- Next in thread: Adam Machanic: "Re: Alter table help"
- Reply: Adam Machanic: "Re: Alter table help"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|