English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For e-g a table consist of values like 80,45,90,60,70.I need a query tht will fetch only the value 80.

2006-08-16 21:11:11 · 6 answers · asked by Testing Arun 2 in Computers & Internet Programming & Design

6 answers

why only second higest, i'm giving u a query by which u can find n'th higest number, simply put the number in place of 'n'

select min(fldName) from tblName Where fldName in (select top n sal from tblName order by fldName desc)

2006-08-16 21:37:16 · answer #1 · answered by jk 1 · 0 0

The correlation coefficient between 2 random variables: a. Is a volume between -a million and a million d. Is envisioned in Excel via way of becoming use of function CORREL the median is: d. the nicely worth that diveide the understanding sequence into 2 equivalent components

2016-12-11 10:15:46 · answer #2 · answered by mundell 4 · 0 0

This is depend upon what database you have. In MySQL you can set the start- and the endpoint. in SQL you would just say
Select Top 1 FieldSeconds from TableName
Order By FieldSeconds DESC
Having FieldSeconds < MAX(FieldSeconds)

Helmut

2006-08-16 21:46:36 · answer #3 · answered by hswes 2 · 0 0

Why not sort them numerically, largest first, pop them into a 'holding area' (small table maybe?), and take the second value?

Gary

2006-08-16 21:23:03 · answer #4 · answered by Gary M 2 · 0 0

select col-name from tab-nam orderby asc where rowid=2;

2006-08-16 21:46:37 · answer #5 · answered by kalamakram 1 · 0 0

select max(column_name) from table t1 where t1.column_name<(select max(column_name) from table);

cool way....

2006-08-16 21:47:47 · answer #6 · answered by Sreekanth 1 · 0 0

fedest.com, questions and answers