sitnikov,
Monday, May 27, 2002, 10:32:07 PM, you wrote:

s> Description:
s>         Problem with timestamp(8) and GROUP BY

s> How-To-Repeat:

mysql>> CREATE TABLE test (
s>     -> id int auto_increment,
s>     -> dd timestamp(8),
s>     -> data int,
s>     -> PRIMARY KEY (id)
s>     -> );
s> Query OK, 0 rows affected (0.01 sec)

[skip]

TIMESTAMP(8) is a display size, not the size of field. If you change
column to TIMESTAMP(14) you can see that you have different values for
dd.
mysql> alter table test change dd dd timestamp(14);
Query OK, 4 rows affected (0.03 sec)
Records: 4  Duplicates: 0  Warnings: 0

mysql> SELECT dd,count(*) FROM test GROUP BY dd;
+----------------+----------+
| dd             | count(*) |
+----------------+----------+
| 20020527000001 |        1 |
| 20020527000002 |        1 |
| 20020527000003 |        1 |
| 20020527000004 |        1 |
+----------------+----------+
4 rows in set (0.00 sec)





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to