56,682
社区成员
发帖
与我相关
我的任务
分享
mysql> create table tx ( id BIGINT unsigned);
Query OK, 0 rows affected (0.16 sec)
mysql> insert into tx values (18446744073709551615);
Query OK, 1 row affected (0.05 sec)
mysql> select * from tx;
+----------------------+
| id |
+----------------------+
| 18446744073709551615 |
+----------------------+
1 row in set (0.00 sec)
mysql>
mysql> CREATE TABLE `data2010_5_10` (
-> `id` bigint(20) default NULL,
-> `instance` varchar(100) default NULL,
-> `ttime` bigint(20) default NULL,
-> `vvalue` bigint(21) unsigned default NULL,
-> KEY `polleddata0_ndx` (`pollid`),
-> KEY `polleddata1_ndx` (`instance`),
-> KEY `polleddata2_ndx` (`ttime`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ERROR 1072 (42000): Key column 'pollid' doesn't exist in table
mysql> CREATE TABLE `data2010_5_10` (
-> `id` bigint(20) default NULL,
-> `instance` varchar(100) default NULL,
-> `ttime` bigint(20) default NULL,
-> `vvalue` bigint(21) unsigned default NULL,
-> KEY `polleddata1_ndx` (`instance`),
-> KEY `polleddata2_ndx` (`ttime`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
-> ;
Query OK, 0 rows affected (0.08 sec)
mysql> insert into data2010_5_10(id,instance,ttime,vvalue) values(3,'3.3.2',1273
481590, 9223372036854775809);
Query OK, 1 row affected (0.03 sec)
mysql> select * from data2010_5_10;
+------+----------+------------+---------------------+
| id | instance | ttime | vvalue |
+------+----------+------------+---------------------+
| 3 | 3.3.2 | 1273481590 | 9223372036854775809 |
+------+----------+------------+---------------------+
1 row in set (0.00 sec)
mysql>