Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT STATEMENT PROBLEM 2

Status
Not open for further replies.

annasue

Technical User
Mar 20, 2004
21
0
0
US
I have this statement for sql:

SELECT * FROM `used_autos` WHERE `mileage` >= 25000 AND <= 50000 ORDER by make

I'm trying to pull all used autos where the mileage is greater than or equal to 25,000 and less than or equal to 50,000. Obviously, I have something wrong in my syntax.

Thanks in advance.
Anna Sue Edwards
 
Try
Code:
SELECT * FROM `used_autos` WHERE `mileage` >= 25000 AND `mileage` <= 50000 ORDER by make

Andrew
Hampshire, UK
 
Or:[tt]
WHERE mileage BETWEEN 25000 AND 50000[/tt]



-----
ALTER world DROP injustice, ADD peace;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top