C language > Beginner questions

sqlite max AND min

(1/1)

Grincheux:
Usually MAX and MIN are used like this SELECT MIN([C1]) AS Mini,MAX([C2)) AS Maxi FROM [MyTable];

There is an other way to use them

SELECT MAX([C1],[C2],][C3]) AS MAX_C1_C2_C3, MIN([C1],[C2],[C3]) AS MIN_C1_C2_C3 FROM [MyTable];

Becareful, I have used it on a table with one record, if there are many hundreds of records you have to drink a lot of coffee before getting the result. ;D ;D ;D

Navigation

[0] Message Index

Go to full version