Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to find out the second largest element from mysql table

Answers were Sorted based on User's Feedback



How to find out the second largest element from mysql table..

Answer / laxmanit08

select final_id from care_billing_final order by final_id
desc limit 1,1;

Is This Answer Correct ?    49 Yes 14 No

How to find out the second largest element from mysql table..

Answer / nikhil mishra

SELECT Salary FROM tablename order by Salary desc limit 1,1

Is This Answer Correct ?    24 Yes 11 No

How to find out the second largest element from mysql table..

Answer / lekhraj deshmukh

select marks from tbl_data where marks<(select max(marks)
from tbl_data) order by marks desc limit 1;

Is This Answer Correct ?    21 Yes 11 No

How to find out the second largest element from mysql table..

Answer / prasadkonnur

select id from tbl_name order by id desc limit(0,1)

(selects 2nd highest id)

for nth highest

select id from tbl_name order by id desc limit(n-1,1)

Is This Answer Correct ?    13 Yes 10 No

How to find out the second largest element from mysql table..

Answer / deo ram yadav

select BranchName
from Account
order by Balance desc limit 1, 1;
Note: ,BranchName' is attribute and 'Account' is table. 1,1 means leave one row and then take another one row.

Is This Answer Correct ?    1 Yes 0 No

How to find out the second largest element from mysql table..

Answer / md aftab alam

select distinct final_id from care_billing_final order by final_id
desc limit 1,1;

Is This Answer Correct ?    2 Yes 1 No

How to find out the second largest element from mysql table..

Answer / ved prakash bishnoi

select salary from tableName group by salary order by
salary limit 2,1

Is This Answer Correct ?    10 Yes 10 No

How to find out the second largest element from mysql table..

Answer / salil

SELECT max( t1.col )
FROM `table` t1
WHERE t1.col < (SELECT max( t2.col ) FROM `table` t2);

Is This Answer Correct ?    4 Yes 4 No

How to find out the second largest element from mysql table..

Answer / prasad

select id from tbl_name order by id desc limit(1,1)

(selects 2nd highest id)

for nth highest

select id from tbl_name order by id desc limit(n-1,1)

Is This Answer Correct ?    5 Yes 5 No

How to find out the second largest element from mysql table..

Answer / prashant chaudhary

select name,marks from Student_Info where marks = (select
max(marks) from Student_Info where marks <
(select max(marks)from Student_Info ))

Is This Answer Correct ?    4 Yes 4 No

Post New Answer

More MySQL Interview Questions

What happens if null values are involved in expressions?

0 Answers  


Which one of the following is the correct way to select all columns and all rows from "vtable"? Choice 1 SELECT FROM vtable SELF JOIN vtable Choice 2 SELECT ALL COLUMNS FROM vtable WHERE ALL ROWS = * Choice 3 SELECT EVERYTHING FROM vtable Choice 4 SELECT vtable.* WHERE vtable = vtable Choice 5 SELECT * FROM vtable WHERE 1 = 1

3 Answers  


How do I install mysql on windows 10 64 bit?

0 Answers  


What ascii 31?

0 Answers  


How do I run mysql on a mac?

0 Answers  


Why we use mysqli instead of mysql?

0 Answers  


What are the different table present in MYsql?

3 Answers  


What is default schema in mysql?

0 Answers  


How can you change the name of any existing table by using the sql statement?

0 Answers  


How much does mysql cost?

0 Answers  


Write a query to fetch duplicate records from a table using mysql?

0 Answers  


How many columns can you create for an index?

0 Answers  


Categories