Saturday, 12 March 2011

SQL MAX Command

                                                  Some time we wanna search max value from table.like students's mark.so this time MAX command is very usefull.

see this command,

SELECT MAX(mark) FROM student;

SQL MIN Function

                                                              When you want to get MIN value from the table used this function.ok see this table,


                                                        table is student




      used this command you can get minimum value from student table       

                                            


Group BY

 Now consider this command


SELECT MIN(mark) 
FROM student
GROUP BY mark

it out put is this.







there  have'nt no them names.ok let us see this example, r
NAME & MARK

consider following  command

SELECT name,MIN(mark)
FROM student
GROUP BY mark

 it output may be,