+ 1
What will be the statement for this condition?
Suppose I have a table named students. I want to have the columns of name, class and marks of the students who has got the lowest marks. What will be the statement for this?
3 Answers
+ 2
Ohh sorry my bad..
Try this
SELECT * FROM `student` WHERE mark=(select min(mark) from student)
0
It's simple..
SELECT name, class, MIN(marks)
FROM students
MIN() : MIN is a aggregate function. It is used to find the minimum value in the column.
Hope you got that.
0
I want only the name, class and marks of the student who has got the lowest marks. The statement that you have given shows the name and class of all of the students and the lowest marks.