On Mon, 19 Jan 2004, Ian O'Rourke wrote:
> Regarding the following query:
>
> SELECT ID,Author,DATE_FORMAT(EntryDate,'%d %m
> %y'),SectionID,Title,Summary,Content FROM articles
> ORDER BY EntryDate
> DESC LIMIT 10
>
> Okay, I've looked in the manually up and down, as I know how to do it in
> Access, but I can't find it. I want to set an expression so I can give the
> Date_Format function a handy name - so it returns the name of the column as
> ArticleDate, for instance.
>
> I'm missing something simple :)
SELECT ID,Author,DATE_FORMAT(EntryDate,'%d %m %y') AS something,
SectionID, Title, Summary, Content
FROM articles
ORDER BY EntryDate DESC
LIMIT 10
(The AS isn't mandatory, you can just state the alias if you want, the AS
can be good for readability, however)
cheers,
Tobias
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]