Reply to Re: selecting only a certain number of bits of data

Your name:

Reply:


Posted by roondog on 04/16/07 11:18

"Toby A Inkster" <usenet200703@tobyinkster.co.uk> wrote in message
news:i7vbf4-4kp.ln1@ophelia.g5n.co.uk...
> roondog wrote:
>
> > I would now like to only show a certain number of the news articles.
> > Say the latest five.
>
> Certain databases allow you to use a "LIMIT" clause to limit the number of
> results returned by a SELECT query. Because this is not part of the
> official SQL standard, the exact syntax varies between databases. Here are
> some examples:
>
> MySQL:
> SELECT * FROM articles ORDER BY created_date DESC LIMIT 5;
>
> PostgreSQL:
> SELECT * FROM articles ORDER BY created_date DESC LIMIT 5;
>
> Microsoft SQL Server:
> SELECT TOP 5 * FROM articles ORDER BY created_date DESC;
>
Thanks for that I knew there was something simple I was missing.

[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

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