List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:November 14 1999 8:31pm
Subject:Re: Group By and Latest Date...
View as plain text  
>>>>> "Steve" == Steve Ruby <stever@stripped> writes:

Steve> If you don't mind the times being in referse order you can do

Steve> select * from test order by date desc limit X;

Steve> where X is the number of latest entries you want to see.

Steve> You should probably watch that column called "DATE" I believe that date
Steve> is a reserved word and this might give you problems down the line


Hi!

Something almost completely unrelated:

In MySQL 3.23.6 (hopefully released tomorrow), you can do:

create table `Steve Ruby table` (`select` blob, `look mummy, no keywords`
 blob);
Query OK, 0 rows affected (0.10 sec)
ysql> show tables;
+---------------------+
| Tables_in_test      |
+---------------------+
| Steve Ruby table    |
+---------------------+  

mysql> show columns from `Steve Ruby table`\G
*************************** 1. row ***************************
Field: select
Type: blob
Null: YES
Key:
Default: NULL
Extra:
Privileges: select,insert,update,references
*************************** 2. row ***************************
Field: look mummy, no keywords
Type: blob
Null: YES
Key:
Default: NULL
Extra:
Privileges: select,insert,update,references
2 rows in set (0.00 sec)

(Note that I don't recommend you creating tables like the above, but
at least you can do it if you feel like it)

If you start mysqld with --ansi, the "-character will also act like a
identifier quote character as not as a string delimiter.  (I didn't do
this by default as I got a small feeling that someone may complain
about this :)

You can read more about the above in the MySQL online Manual.

Regards,
Monty
Thread
Group By and Latest Date...Simon Sadler26 Oct
  • Re: Group By and Latest Date...Steve Ruby26 Oct
    • Re: Group By and Latest Date...Michael Widenius14 Nov
  • Re: Group By and Latest Date...Simon Sadler26 Oct
    • Re: Group By and Latest Date...Bob Kline26 Oct
      • Re: Group By and Latest Date...Simon Sadler27 Oct
        • Re: Group By and Latest Date...Bob Kline27 Oct
      • Re: Group By and Latest Date...Arun Bhalla27 Oct
        • Re: Group By and Latest Date...Bob Kline27 Oct
  • Re: Group By and Latest Date...jcole27 Oct