Pages

Wednesday, January 19, 2011

MAX & MIN

MAX & MIN
--==========================================[MAX and MIN]===================================================================
-- MAX aggregate function allows us to select the highest (maximum) value for a certain column.

--Max---------
SELECT MAX(EmailPromotion) AS MaxEmailPromo
FROM Person.Contact

--Min---------
SELECT MIN(EmailPromotion) AS MinEmailPromo
FROM Person.Contact

No comments:

Post a Comment