Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: HOW TO SELECT LATEST INSERTED ROW..

Re: HOW TO SELECT LATEST INSERTED ROW..

From: Saurabh Sharma <saurabhs_at_fcsltd.com>
Date: Thu, 22 Feb 2001 22:29:01 -0800
Message-ID: <F001.002BB69E.20010222220042@fatcity.com>

thanks rana sengupta.
it worked. but it is actually working
fine whileinserting 1 row at a time.
i tried to write with row level trigger. but both should be statement level triggers. else giving errors like. table is  mutataing, trigger/function can't see it..etc.
 

thanks again.
 

saurabh
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

  Hay,
  U can proceed in following
  way..........
  create a dummy table having one row one column   ; 
  Update this value in a row level insert trigger   of your concrn table by the current row id ( or any key ).   Next use a statement level insert trigger on that   concern table and by select that key from dummy table U and perform   the 
  required opr.
   
  This Row-level & Statement level triggers   will be usefull only when U inserting 1 row at a time.   Regards 
  Rana SenguptaExecutive SystemsUsha Martin Telekom Ltd.11 Dr.   U N Bhramchari Road.Calcutta - 700017Cell Phone: + 91 98300   32780Email : <A
  href="mailto:ranasengupta_at_umtl.co.in">ranasengupta_at_umtl.co.inWeb: <A   href="http://www.commandcell.com">www.commandcell.com   <BLOCKQUOTE
  style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">     HI ALL,
    how can i select the latest inserted     row from a table.
    i want to select a col value, perform     some operation on it and update the same to table via a     trigger..
    it says table is
    mutating.
    i'm inserting rows 1 at a
    time.
     
    any suggestions..
    thanks in advance.
    <FONT face="Comic Sans MS"
size=2>saurabh  Received on Fri Feb 23 2001 - 00:29:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US