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

how do you test proper tcp/ip configuration windows machine? : Sql server database administration

1000


Different types of keys in SQL?

1034


Is null in sql server?

941


What is the difference between lock, block and deadlock? : sql server database administration

992


What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

962


Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication

938


Why do we backup Active Directory ?

998


How do I connect to sql server database?

951


ow to bring suspect mode datbase online from scratch

1762


When would you prefer to have a minimum number of indexes?

843


Explain full-text indexing?

918


What is a heap?

985


what does the automatic recovery do? : Sql server administration

960


What is the difference between grant and with grant while giving permissions to the user?

900


How to add additional conditions in SQL?

974