0

how to find second largest number in column

1st Nov 2016, 11:48 AM
Narsa reddy
Narsa reddy - avatar
2 ответов
+ 1
I believe that with this command is possible: Selec max(name-column) from your-table where name-column != (select Max(name-column) from your-table )
1st Nov 2016, 1:39 PM
Ronald Serrão
Ronald Serrão - avatar
+ 1
SELECT * FROM TableName a Where 2 = (SELECT count(DISTINCT(b.ColumnName)) FROM TableName b WHERE a.ColumnName <= b.ColumnName);
1st Nov 2016, 2:06 PM
Keshav Modi