代码改变世界

阅读排行榜

MySQL的reset slave与reset slave all

2017-10-31 19:26 by abce, 10007 阅读, 收藏,
摘要: reset slave是各版本Mysql都有的功能,可以让slave忘记自己在master binary log中的复制位置。 reset slave命令主要完成以下工作内容: -删除master.info和relay-log.info文件 -删除所有的relay log(包括还没有应用完的日志) 阅读全文

MySQL中的timestamp数据类型

2021-11-07 19:41 by abce, 9911 阅读, 收藏,
摘要: 最近看了两篇关于timestamp的文章,正好手头有MySQL5的版本要升级。翻了翻版本5、6、7的文档,做了点笔记。 两篇博客地址: MySQL的TIMESTAMP类型字段非空和默认值属性的影响 MySQL迁移后timestamp列cannot be null date: 日期。有效范围是‘100 阅读全文

postgreSQL中timestamp转成date格式

2020-05-26 11:14 by abce, 9872 阅读, 收藏,
摘要: 尝试了以下两种方式,将pg中的timestamp格式转换成date格式: 方式一: select to_date( to_char( f.begin_time, 'yyyy-mm-dd' ), 'yyyy-mm-dd' ) from hafd f 方式二: select f.begin_time:: 阅读全文

mysql用户报错Access denied; you need (at least one of) the SUPER privilege(s) for this operation

2022-05-11 19:15 by abce, 9814 阅读, 收藏,
摘要: 同事说数据库账号没有授权,要求给某个数据库用户授予super权限。 纳闷呢,为啥需要super权限啊! 原来他在创建函数的时候报错: > 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this 阅读全文

postgresql中三种不适合使用if not exists、if exists的场景

2022-05-31 08:37 by abce, 9538 阅读, 收藏,
摘要: postgresql中,许多ddl语句支持if exists、if not exists。例如: postgres=# create table if not exists abce(); CREATE TABLE postgres=# drop table if exists abce; DROP 阅读全文
上一页 1 2 3 4 5 6 7 8 9 ··· 246 下一页