SAMPLE 北風
select count(*) sn, a.CustomerID from Customers a , Customers b
where b.CustomerID <= a.CustomerID
group by a.CustomerID
order by a.customerid
Result:
sn CustomerID
----------- ----------
1 ALFKI
2 ANATR
3 ANTON
4 AROUT
5 BERGS
6 BLAUS
沒有留言:
張貼留言