随笔 - 502  文章 - 1 评论 - 6 阅读 - 37万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  Mysql 使用

上一页 1 2
Mysql 查询列名
摘要:#列名 select COLUMN_NAME from information_schema.columns where TABLE_SCHEMA='yunpiaobox_db' and table_name='t_announcement' #列名字符串 按,分隔 select GROUP_CONCAT(COLUMN_NAME separator ',') '逗号分隔', GROU... 阅读全文
posted @ 2018-06-14 10:06 1161588342 阅读(682) 评论(0) 推荐(0) 编辑
Mysql Windows 7 异常关闭, 2003 - Can't connect to Mysql server on 'localhost' (10061) "Unknown error")
摘要:如下: 按Win+R在窗口输入services.msc 启动mysql服务 阅读全文
posted @ 2018-04-17 09:34 1161588342 阅读(213) 评论(0) 推荐(0) 编辑
mySQL:两表更新(用一个表更新另一个表)的SQL语句
摘要:https://www.cnblogs.com/nsw2018/p/6398020.html 阅读全文
posted @ 2018-01-22 10:39 1161588342 阅读(442) 评论(0) 推荐(0) 编辑
Mysql 游标使用
摘要:BEGIN #shopsId 商家ID #accountDay 10位日期 2018-01-09 -- 定义一个或者多个 变量来接收 游标查询的列值 DECLARE receiptContentId INT; -- 遍历数据结束标志 DECLARE done INT DEFAULT FALSE... 阅读全文
posted @ 2018-01-12 14:29 1161588342 阅读(175) 评论(0) 推荐(0) 编辑
Mysql IN 优化
摘要:https://www.cnblogs.com/yuanpengchao/p/5783500.html 阅读全文
posted @ 2018-01-11 12:03 1161588342 阅读(117) 评论(0) 推荐(0) 编辑
Mysql 唯一性约束添加
摘要:来自: http://blog.csdn.net/yumushui/article/details/38960619 阅读全文
posted @ 2018-01-02 11:35 1161588342 阅读(2545) 评论(0) 推荐(0) 编辑
Mysql 函数, 存储过程, 任务调度
摘要:官网链接: https://dev.mysql.com/doc/refman/5.7/en/stored-programs-views.html 阅读全文
posted @ 2017-12-25 15:09 1161588342 阅读(154) 评论(0) 推荐(0) 编辑
Mysql 日期类型 date、datetime、timestamp.
摘要:三种: date、datetime、timestamp. 阅读全文
posted @ 2017-12-20 18:37 1161588342 阅读(139) 评论(0) 推荐(0) 编辑
Mysql 获取当天,昨天,本周,本月,上周,上月的起始时间
摘要:转自: http://www.cppblog.com/tx7do/archive/2017/07/19/215119.html SQL: 阅读全文
posted @ 2017-12-20 15:27 1161588342 阅读(348) 评论(0) 推荐(0) 编辑
Mysql 事件event_scheduler是OFF
摘要:1 在查询窗口执行: SHOW VARIABLES LIKE 'event_scheduler' 查看是OFF 还是ON; 方式1: 修改.int配置文件 添加一行: event_scheduler = 1 cmd- > services.msc找到Mysql 重启服务就OK了 方式2: 开启 Ev 阅读全文
posted @ 2017-12-20 14:49 1161588342 阅读(1764) 评论(0) 推荐(0) 编辑
Mysql 用户管理
摘要:用户管理权限设置: https://www.cnblogs.com/fslnet/p/3143344.html 只给用户看视图:http://blog.csdn.net/escapeplan/article/details/77164664 阅读全文
posted @ 2017-11-22 17:16 1161588342 阅读(105) 评论(0) 推荐(0) 编辑
Mysql 常见错误
摘要:修改.ini 配置 sql_mode='NO_ENGINE_SUBSTITUTION' 然后重启服务 阅读全文
posted @ 2017-10-30 19:00 1161588342 阅读(106) 评论(0) 推荐(0) 编辑
Mysql 表名大写 找不到表
摘要:原来Linux下的MySQL默认是区分表名大小写的,通过如下设置,可以让MySQL不区分表名大小写:1、用root登录,修改 /etc/my.cnf;2、在[mysqld]节点下,加入一行: lower_case_table_names=13、重启MySQL即可; 其中 lower_case_tab 阅读全文
posted @ 2017-10-14 10:20 1161588342 阅读(835) 评论(0) 推荐(0) 编辑
Mysql 字符串截取
摘要:http://www.cnblogs.com/zdz8207/p/3765073.html 阅读全文
posted @ 2017-10-09 17:45 1161588342 阅读(93) 评论(0) 推荐(0) 编辑
Mysql 主键常用修改
摘要:修改表的定增长初始值: ALTER TABLE 表名 AUTO_INCREMENT=值; 阅读全文
posted @ 2017-10-09 12:15 1161588342 阅读(93) 评论(0) 推荐(0) 编辑
Mysql 2条记录 差值计算
摘要:1 表结构 2: 其实 是2个相同的 表根据rownum= rownum-1 来计算,所以先了解单个表的查询 附上SQL: 3:2个相同的表计算差值秒 4:秒的差值计算 (UNIX_TIMESTAMP(time1) - UNIX_TIMESTAMP(time2)) diff_second 分钟差值计 阅读全文
posted @ 2017-09-21 12:09 1161588342 阅读(2585) 评论(0) 推荐(0) 编辑
Mysql 触发器 A表记录到B表
摘要:1:查询出需要的列名 备用 #列名select COLUMN_NAME from information_schema.columns where TABLE_SCHEMA='yunpiaobox_db' and table_name='t_box_status' TABLE_SCHEMA: 数据库 阅读全文
posted @ 2017-09-21 10:55 1161588342 阅读(320) 评论(0) 推荐(0) 编辑
Window Mysql 5.7.18安装
摘要:1:下载地址 https://dev.mysql.com/downloads/mysql/ 点击Community , 然后点击Community Server 位置, 下载 安装包 2: 配置环境变量 MYSQL_HOME=D:\mysql-5.7.18-winx64 PATH路径后面添加 %MY 阅读全文
posted @ 2017-09-08 17:56 1161588342 阅读(168) 评论(0) 推荐(0) 编辑
阿里云服务器 CentOS 安装Mysql 5.6, 5.7
摘要:安装5.7 借鉴地址:https://www.cnblogs.com/lightsrs/p/7836651.html 第一步如下5.6步骤 [root@node03 ~]# rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7 阅读全文
posted @ 2017-09-06 10:48 1161588342 阅读(383) 评论(0) 推荐(0) 编辑

上一页 1 2
点击右上角即可分享
微信分享提示