Reply to Re: Optimizing SQL queries

Your name:

Reply:


Posted by Justin on 04/11/06 05:18

Ridge Burner wrote:
> I'm using MySQL 5.0.18-Debian_8, sorry guess I should have said. :O
>
>
> "Tim Van Wassenhove" <timvw@users.sourceforge.net> wrote in message
> news:e1es7d$sap$3@ikaria.belnet.be...
>> On 2006-04-10, Ridge Burner <nospam@nospam.com> wrote:
>>> I'm looking for a SQL statement like so:
>>>
>>> $sql = "SELECT first 3 items for each UNIQUE user ORDER BY date_added
>>> ASC";
>> I can only think of a solution where you perform a subquery to get the
>> desired results. Which SQL-DBMS are you using? And which version? If i'm
>> not mistaken MySQL only supports subqueries since version 4.1.
>>
>> --
>> Met vriendelijke groeten,
>> Tim Van Wassenhove <http://timvw.madoka.be>
>
>
Google search gave me the following example.

SQL Server:
SELECT TOP 10 product, descr, email
FROM products

ORACLE:
SELECT product, descr, email
FROM products
WHERE ROWNUM <= 10

MySQL:
SELECT product, descr, email
FROM products
LIMIT 10

Google is yer friend!!!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация