![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
lanxingmo
这个作者很懒,什么都没留下…
展开
-
ignore 只针对存在唯一索引的字段有效
create table test(id int auto_increment primary key ,a varchar(60),unique index(a)); MySQL [msg_center_dev]> select * from test; +----+------+| id | a |+----+------+| 1 | a |+----+------+1 row in set (0.004 sec)MySQL [msg_center_dev...原创 2021-03-11 11:37:00 · 272 阅读 · 0 评论 -
mysql Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.行的长度不能超过65535,即列的大小总和除了BLOBs longtext类型,总大小不能超过65535,修改列的大小,并将部分列修改为longtext...原创 2021-01-14 12:29:53 · 367 阅读 · 0 评论 -
group by sql_mode=only_full_group_by 问题
mysql> select id from topic group by update_time having count(update_time) > 1;ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'imdb.topic.id' which is not functionally dependent on co...原创 2020-08-14 15:34:03 · 103 阅读 · 0 评论 -
mysql修改时间列精度
6位小数:CREATE TABLE `topic2`(`update_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),`detail_location` varchar(1024) DEFAULT '' COMMENT '详细地址');mysql> insert into topic2(detail_location)values('dddd');Query OK原创 2020-08-14 14:41:10 · 389 阅读 · 0 评论 -
mysql导表数据
导出表结构及数据mysqldump -uroot -hxxx.com -pxxx dbname tablename > tablename.txt仅导出表结构加 -dmysqldump -uroot -hxxx.com -pxxx -d dbname tablename > tablename.txt备份所有数据库mysqldump -u root -p --all-databases > database_dump.txt导出库mysqldump -u...原创 2020-05-11 16:17:19 · 119 阅读 · 0 评论