|
Re: hoe to generate automatic number [message #88983 is a reply to message #88981] |
Wed, 16 July 2003 02:20 |
Rahman
Messages: 40 Registered: July 2003
|
Member |
|
|
A.A.W.W.
hi saima!
if u consider emp table & Suppose first EmpNo is 7001 (whatever else) in first row of emp table
then follow the Steps:
Declare
Curr_EmpNo Number;
begin
select max(EmpNo) into Curr_EmpNo from emp
where level=1
connect by prior EmpNo > EmpNo
group by level;
Insert into emp values (Curr_EmpNo+1,........);
Hope u understand !!!!!!
bye
Rahman
|
|
|
|