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

Home -> Community -> Usenet -> c.d.o.misc -> Pl/sql newbie question....

Pl/sql newbie question....

From: <smenard_at_avior.com>
Date: Fri, 04 Oct 2002 13:15:36 -0400
Message-ID: <20021004.131536.165344818.12214@avior.com>


I have a table:

inv_id, count,qty,size1,size2

  1           1          2   3        6
  2           1         2    3         4 
  1            2        4    8        10

where the keys is a composite ind_id and coount.

What is the best way to implement the column count when i insert a new row in this table...?

i do it like that but i'm not sure because i don't lock the table...

cursor test_cur is select count(*) from inv where inv_id=1; ...
fetch text_cur into nb_count;

nb_count:=nb_count+1;  

insert into inv_id values(1,nb_count,43,12,44);

what is the best way to that in Oracle? Received on Fri Oct 04 2002 - 12:15:36 CDT

Original text of this message

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