MySQL
文章平均质量分 73
龙池小生
养性事天,修身立命
展开
-
Navicat for Mysql 设置默认时间
表设计--》默认 :CURRENT_TIMESTAMP原创 2020-01-04 15:39:54 · 3905 阅读 · 0 评论 -
The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone
驱动,com.mysql.cj.jdbc.Driver 连接数据库,启动项目控制台报错:java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone解决方法:url连接加上 serverTimezone=CTT...原创 2019-11-05 11:42:58 · 149 阅读 · 0 评论 -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
昨天做一个功能,新建了一个数据表,然后在执行增加功能的时候后台报错:java.sql.BatchUpdateException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '...原创 2018-03-21 16:06:32 · 3054 阅读 · 1 评论 -
navicat for MySQL 批量导出表结构
右键数据库选择数据传输---》常规---》展开表选择要导出的表---》选择导出目标---》若是只想导出表结构,不导出表数据:选择 高级 --》取消勾选插入记录点击开始导出...原创 2019-06-12 16:34:46 · 21847 阅读 · 4 评论 -
MySQL,查询数据库表的所有字段名称
SELECT GROUP_CONCAT(COLUMN_NAME SEPARATOR ",") FROM information_schema.COLUMNSWHERE TABLE_SCHEMA = '你的数据库名称' AND TABLE_NAME = '表名'例如:原创 2019-06-23 11:59:03 · 1465 阅读 · 0 评论 -
mysql,explain执行计划组合索引测试
创建测试表,添加测试数据CREATE TABLE `users` ( `id` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `age` int(11) DEFAULT NULL, `manager_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `idex_...原创 2019-09-10 23:10:50 · 52845 阅读 · 0 评论 -
mysql 行列转换,行转列和列转行
目录行转列列转行行转列建立测试表,添加测试数据DROP TABLE IF EXISTS `score`;CREATE TABLE `score` ( `subject` varchar(255) DEFAULT NULL, `score` int(11) DEFAULT NULL, `stu_id` int(11) DEFAULT NULL) ENGINE=I...原创 2019-09-11 14:00:54 · 35228 阅读 · 0 评论