Switch to full style
Learn how to use MS-DB
Post a reply

what is the query to retrieve to student data based on least

Wed Jun 01, 2011 1:13 pm

what is the query to retrieve to student data ( ex: name,rollno,total) based on least 5 total marks...??

any body plz help!!



Re: what is the query to retrieve to student data based on least

Wed Jun 01, 2011 6:33 pm

you mean like this
Code:
select name,rollno,total from student where total>5


Re: what is the query to retrieve to student data based on least

Thu Jun 02, 2011 2:16 pm

no bro..
i want to retrieve 5 students data who secured least marks of total...

Re: what is the query to retrieve to student data based on least

Thu Jun 02, 2011 9:28 pm

you want to order them by date , you want to get the most recent students those get a specific grade of total X ?

Re: what is the query to retrieve to student data based on least

Fri Jun 03, 2011 8:42 am

no bro..
take a example table below...
sname marks
a 50
b 42
c 78
d 36
e 88
f 38
g 45
h 92

here i want to retrieve the data (sname,marks) of 5 students who secured less marks ie i want to display the folloeing data

sname marks
a 50
b 42
d 36
f 38
g 45

Re: what is the query to retrieve to student data based on least

Fri Jun 03, 2011 12:16 pm

ah ok , you can use limit and order ascending like this


Code:
select name,rollno,total from student order by total asc limit 0,5


Re: what is the query to retrieve to student data based on least

Fri Jun 03, 2011 12:38 pm

thank u very much bro!!:)

Post a reply
  Related Posts  to : what is the query to retrieve to student data based on least
 How to upload and retrieve image in jsp please send me code     -  
 Cookie based login in php     -  
 Run different function based on the selected Tab JTabbedPane     -  
 prapose me a web based mini project     -  
 Home Based Research Jobs.     -  
 Takes a string apart based on a delimiter     -  
 Circle drawing using Polar based algorithm with C++     -  
 Simple Text-Based RPG Java Project Help!     -  
 Hi, i sm sn B-Tech student i need ur help. u can help me     -  
 Program to make a pyramid of characters based on input     -