MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael Stassen Date:July 27 2004 3:14pm
Subject:Re: select in Mysql 4.0
View as plain text  
You're absolutely right, date is not a reserved word.  Don't know what I was 
thinking.

Michael

Jocelyn Fournier wrote:
> Hi,
> 
> AFAIK, date is *not* a reserved keyword, not need to backtick it :)
> 
> Regards,
>   Jocelyn Fournier
>   www.presence-pc.com
> ----- Original Message ----- 
> From: "Michael Stassen" <Michael.Stassen@stripped>
> To: "fgmmoribe" <fgmmoribe@stripped>
> Cc: "mysql" <mysql@stripped>
> Sent: Tuesday, July 27, 2004 7:11 AM
> Subject: Re: select in Mysql 4.0
> 
> 
> 
>>fgmmoribe wrote:
>>
>>>I have a table like this
>>>
>>>
> 
> +-------------+-------------------+------+-----+---------+----------------+
> 
>>>| Field       | Type              | Null | Key | Default | Extra
> 
> |
> 
> +-------------+-------------------+------+-----+---------+----------------+
> 
>>>| id          | int(3)            |      | PRI | NULL    |
> 
> auto_increment |
> 
>>>| idTable     | int(3) unsigned   |      |     | 0       |
> 
> |
> 
>>>| title       | varchar(150)      | YES  |     | NULL    |
> 
> |
> 
>>>| description | varchar(150)      | YES  |     | NULL    |
> 
> |
> 
>>>| date        | datetime          | YES  |     | NULL    |
> 
> |
> 
> +-------------+-------------------+------+-----+---------+----------------+
> 
>>>Is there anyway to make select command like this in Mysql 4.0:
>>>select * from #temp where cod in (select max(cod) from #temp
>>>group by idtable) order by data desc
>>>
>>>could someone help me?
>>>
>>>thanks
>>>
>>>Fernando
>>
>>Subqueries require mysql 4.1.
>>
>>date is a reserved word, so not the best choice for a column name.  You'll
>>always have to quote it with backticks to use it.
>>
>>Your query doesn't seem to match your table.
>>
>>That said, I think you want
>><http://dev.mysql.com/doc/mysql/en/example-Maximum-column-group-row.html>.
>>
>>Michael
>>
>>
>>-- 
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>>
>>
> 
> 
> 

Thread
select in Mysql 4.0fgmmoribe27 Jul
  • Re: select in Mysql 4.0Michael Stassen27 Jul
  • Re: select in Mysql 4.0Jocelyn Fournier27 Jul
    • Re: select in Mysql 4.0Michael Stassen27 Jul
  • Re: select in Mysql 4.0SGreen27 Jul