select name,marks,
(Select count(distinct marks) from <table> where marks <= a.marks) RANK
from <table> a

--
-Vishal

"Jay" <jayesh131hotmail.com> wrote in message
news:HcjPa.9100$Wv2.2670168156newssvr10.news.prod igy.com...
>
> This my table with student's marks obtained in a test:
>
> Name Marks Rank
> ==== ===== ====
> A 65
> B 95
> C 55
> ---
> ---
>
>
> I want the RANK field to be updated with 1, 2, 3,.... such that the
student
> with the highest marks is given RANK 1, 2nd highest given RANK 2 etc..
>
>
> Please help writing the SQL statement. A single statement would be best.
>
>
> Thanks,
> Jay
>
>
>