Muhammad younas

Muhammad younas

  • NA
  • 169
  • 484.3k

select maximum value

Oct 22 2012 6:49 AM
i m using sql server 2005
i want to get top 10 maximum records from a table. i m using query
select top(10) marks from tbl where testname='computer' order by desc
it gives result as

80
77
50
4
30
2
20
1
1
1


it sort them only by first character not by all characters
4 is greator than 3 but 4 is not greator thn 30,

how it can be solved

Answers (5)