Re: how to change a foreign key back to a primary key

2002-05-30 Thread Igor Neyman



First:
 
Alter table  drop constraint 

 
then:
 
alter table  create constraint 
 primary key (organization_id, 
address_id)
 
Igor Neyman, OCP DBA[EMAIL PROTECTED]  


  - Original Message - 
  From: 
  Meomeo Nguyen 
  
  To: Multiple recipients of list ORACLE-L 
  
  Sent: Thursday, May 30, 2002 11:23 
  AM
  Subject: Re: how to change a foreign key 
  back to a primary key
  
  Hi Igor, 
  I just wanted to set a concatenated keys for my table.  By mistake, I 
  assigned only one primary key instead of two combined together. 
  Here is my table structure: 
  organization_id  (primary key) 
  address_id  (foreign key)  It should have been a primary key as 
  well.  I wanted to set this attribute as primary key.  How do I do 
  that? 
  address_type 
  Thanks for your help.  I do appreciate it. 
  Trang 
    Igor Neyman <[EMAIL PROTECTED]> wrote: 
  



Trang,
 
Could you be a little bit more specific about what you are 
trying to do?
 
Igor Neyman, OCP DBA[EMAIL PROTECTED]  


  - Original Message - 
  From: 
  Meomeo 
  Nguyen 
  To: Multiple recipients of list 
  ORACLE-L 
  Sent: Wednesday, May 29, 2002 7:05 
  PM
  Subject: how to change a foreign key 
  back to a primary key
  
  Hi,
  I need to change a foreign key back to a primary key in a 
  table.  How do I do that.  Please help. 
  Thanks in advance.
  Trang
  
  
  Do You Yahoo!?Yahoo! 
  - Official partner of 2002 FIFA World Cup
  
  
  Do You Yahoo!?Yahoo! - 
  Official partner of 2002 FIFA World Cup


Re: how to change a foreign key back to a primary key

2002-05-30 Thread Meomeo Nguyen
 Hi Igor,
I just wanted to set a concatenated keys for my table.  By mistake, I assigned only one primary key instead of two combined together.
Here is my table structure:
organization_id  (primary key)
address_id  (foreign key)  It should have been a primary key as well.  I wanted to set this attribute as primary key.  How do I do that?
address_type
Thanks for your help.  I do appreciate it.
Trang
  Igor Neyman <[EMAIL PROTECTED]> wrote: 




Trang,
 
Could you be a little bit more specific about what you are trying to do?
 
Igor Neyman, OCP DBA[EMAIL PROTECTED]  

- Original Message - 
From: Meomeo Nguyen 
To: Multiple recipients of list ORACLE-L 
Sent: Wednesday, May 29, 2002 7:05 PM
Subject: how to change a foreign key back to a primary key

Hi,
I need to change a foreign key back to a primary key in a table.  How do I do that.  Please help. 
Thanks in advance.
Trang


Do You Yahoo!?Yahoo! - Official partner of 2002 FIFA World CupDo You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

RE: how to change a foreign key back to a primary key

2002-05-30 Thread Richard Huntley



Trang,
 
How 
about:
alter 
table TABLE_NAME drop constraint CONSTRAINT_NAME;
alter 
table TABLE_NAME add constraint pk_TABLE_NAME primary key 
(COLUMN)
using 
index tablespace indexes;
 
-Original Message-From: Meomeo Nguyen 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, May 29, 2002 7:06 
PMTo: Multiple recipients of list ORACLE-LSubject: how to 
change a foreign key back to a primary key
Hi,
I need to change a foreign key back to a primary key in a table.  
How do I do that.  Please help. 
Thanks in advance.
Trang


Do You Yahoo!?Yahoo! - 
Official partner of 2002 FIFA World Cup


Re: how to change a foreign key back to a primary key

2002-05-30 Thread Igor Neyman



Trang,
 
Could you be a little bit more specific about what you are 
trying to do?
 
Igor Neyman, OCP DBA[EMAIL PROTECTED]  


  - Original Message - 
  From: 
  Meomeo Nguyen 
  
  To: Multiple recipients of list ORACLE-L 
  
  Sent: Wednesday, May 29, 2002 7:05 
  PM
  Subject: how to change a foreign key back 
  to a primary key
  
  Hi,
  I need to change a foreign key back to a primary key in a table.  
  How do I do that.  Please help. 
  Thanks in advance.
  Trang
  
  
  Do You Yahoo!?Yahoo! - 
  Official partner of 2002 FIFA World Cup