homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

MAX/MIN Question

 12:07 am on Jun 9, 2011 (gmt 0)

is the following illegal?

SELECT `Make` , `Model` , `Price`
FROM `inventory`
Price = MAX( Price );

thanks to all



 4:25 pm on Jun 9, 2011 (gmt 0)

What do you mean by "illegal?" I don't know anyone who will issue a fine for that. :)

As far as improper syntax goes, you may need to rewrite it this way:
SELECT `Make` , `Model` , `Price`
FROM `inventory`
WHERE Price = (SELECT MAX(Price) FROM `inventory`);


 7:48 am on Jun 10, 2011 (gmt 0)


you do actually get a $250 fine in Singapore; fortunately it's not as bad as chewing gum ;-)


 4:35 pm on Jun 10, 2011 (gmt 0)

That's why I don't write code in Singapore. ;)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved