select
(select
count(*)
from
emp
where
emp.eno <= t1.eno
) as rownum,
t1.*
from
emp t1
order by
rownum
If field is not ordered already then do
select
(select
count(*)
from
emp
where
emp.eno <= empold.eno
) as rownum,
empold.*
from
(select * from emp order by eno) as empold
(select
count(*)
from
emp
where
emp.eno <= t1.eno
) as rownum,
t1.*
from
emp t1
order by
rownum
If field is not ordered already then do
select
(select
count(*)
from
emp
where
emp.eno <= empold.eno
) as rownum,
empold.*
from
(select * from emp order by eno) as empold
No comments:
Post a Comment