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...

I have student marks in a student table. I need second
highest mark .Then what will the query for this?

Answer Posted / devi

Get data to internal table from database table using select query.
Sort the second internal table by ascending order.
Then use Delete adjacent duplicates comparing highest marks.
It will remove duplicate highest marks.
Then sort the internal table by descending order.
Read internal table into workarea index 2.
It will give the second highest mark.

Some times we have to process more steps using all data's. At that time we have to create two internal table with same structure . Move the data from firs table to second table and do the above steps.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me can we use custom code in ssrs?

1054


What are the purpose of Normalisation?

1096


Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)

1941


What is a bit datatype?

1021


What are the fixed server level roles? : sql server security

1219


How to connect Azure federated root database and apply federation in entity framework?

109


What are the benefits and tasks of object explorer? : sql server management studio

1251


What is Command line parameters in PLSQL.?

1192


Tell me what do you mean by an execution plan? Why is it used? How would you view it?

946


What is named calculation? : sql server analysis services, ssas

1024


What are the pre-defined functions in the sql server?

1183


What is the difference between Normalization and De-normalization?

1144


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

1053


How to create a user name in a database?

1102


Define Business Edition in SQL Azure?

102