SQL HELP: How to get the 2 largest values from the table -


i select top 2 int values in table

for example lets table looks this

(name,int)  (a,1)  (b,2)  (c,2)  (d,5) 

my result query return d, b, , c

i not sure how approach this, suggestions?

2 or 3 values? question says both???

select top 3 name mytable order intcol desc 

is homework? [note: naming column 'int' poor choice. choose meaningfull]


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -