Re: sql*plus question

From: Programming <sysdev_at_mb.sympatico.ca>
Date: 1997/07/21
Message-ID: <33D3669F.7199_at_mb.sympatico.ca>#1/1


What is the primary key?
Is it possible to update a primary key?
I thought that you had to drop the row, then insert, if you wanted to change the key. Isn't that right?

Rodger

smp wrote:  

 Hi,

         This has got to be an easy one but my brain has gone dead and I can't work it
 out.
  I would appreciate any clues to the answer.  

 I have two tables header and detail which have a master-detail elationship
 with invoice as the key.  

 header

         invoice  varchar2(10)
         ref         varchar2(5)
         other stuff. .
 
 detail
         invoice varchar2(10)
               other stuff. . .
 

 I want to amend the invoice number for both header and detail if the ef in
 the header holds a particular value  

 eg                      should become
 Header:-
         invoice 123456          invoice 97123456
         bref      CHANGE                bref      CHANGE
 
 Detail:-
         invoice 123456          invoice 97123456
 

 I would like to do this in one pass if possible  

 Help!!!!
 Yours gratefully  

 Sally Pearce
 Financials DBA(for my sins) Received on Mon Jul 21 1997 - 00:00:00 CEST

Original text of this message