logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

MIN - Selecting a Minimum Number in SQL


The MIN function in SQL is much like the MAX function. Where the MAX function gives you the highest number found in a given field, the MIN gives you the smallest number.

Let's say you were running a sale on soap products and you wanted to automatically have the system promote whatever your cheapest item was on the front page, without having to recode the front page every time you changed your price list. You could do

Select MIN(soap_price) as MinPrice from soaps

and then use a

response.write "Our soaps are available from only " & objRec3("MinPrice") & "!!"

as the tag line on your site homepage.

The min function can get you the lowest price, the smallest gear size you support, and any other numeric value.
Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to Twitter Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to Facebook Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to MySpace Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to Del.icio.us Digg MIN+%2D+Selecting+a+Minimum+Number+in+SQL Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to Yahoo My Web Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to Google Bookmarks Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to Stumbleupon Add MIN+%2D+Selecting+a+Minimum+Number+in+SQL to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor