I want to generate the serial no.s
e.g.
I have,
NID
-----
ABD90
BGJ89
HSA76
and I want,
ID NID
---------
1
Since you tagged SAS, I'll answer with SAS.
Based on your question, getting that result from that input would be as simple as this
data result;
ID=_N_;
set input;
run;
or
proc sql;
select ID as monotonic()
,NID
from input
;
quit;
In pure Oracle you would do this
select rownum, NID
from input
However you might want to throw on ORDER BY in there because you'll likely get different results every time you run that.