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

what is spatial nonclustered index

983


How you trouble shoot when any job fails

1932


What are the extra roles available in msdb? : sql server security

1125


What is primary key index?

975


How will you make an attribute not process? : sql server analysis services, ssas

1080


what is the maximum size of a row? : Sql server database administration

1005


What is ms sql server index?

1093


What is function of ROLLUP ?

1078


Explain transaction server consistency?

962


What do you mean by cardinality?

901


What is for xml in sql server?

1060


Which rendering formats are affected by the pagesize properties?

144


What are the encryption mechanisms in sql server?

1021


Explain different types of Normalization.

1825


Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

918