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!!
Thu Jun 02, 2011 2:16 pm
no bro..
i want to retrieve 5 students data who secured least marks of total...
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 ?
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
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
Fri Jun 03, 2011 12:38 pm
thank u very much bro!!:)
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.