ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code


Servers / Setup
Host Reviews
Server Setup
Error Tips


Contract ASP
Development

Search For:


Intro to ASP


 


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.

SQL Command Listing

Bookmark this site so you can reference it any time you have ASP questions in the future!




ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright © 2012 Minerva WebWorks LLC. All rights reserved.

French Wedding


Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error