List:General Discussion« Previous MessageNext Message »
From:sulewski Date:January 19 2004 7:21pm
Subject:Re: Expressions
View as plain text  
I think you can just put the alias after the field like so,

select id,author,date_format(entrydate,'%d %m %y') ArticleDate, 
SectionId,Title,Summary...


On Monday, January 19, 2004, at 02:16  PM, 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 :)
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?unsub=1
>

Thread
ExpressionsIan O'Rourke19 Jan
  • Re: ExpressionsMartin Gainty19 Jan
  • Re: Expressionssulewski19 Jan
    • Re: ExpressionsIan O'Rourke19 Jan
  • Re: ExpressionsTobias Asplund19 Jan
  • Re: ExpressionsChris W19 Jan