数据库
数据库
leo7moon
代码的搬运工
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mysql information_schema常用视图
1.查看数据库ry-vue库所有表: select * from information_schema.TABLES where table_schema = 'ry-vue' 2.查看数据库ry-vue库所有列: select * from information_schema.COLUMNS where table_schema = 'ry-vue' 3.查看数据库ry-vue库所有索引: select * from information_schema.STATISTICS where tab原创 2022-03-22 13:31:16 · 1271 阅读 · 0 评论 -
mysql统一修改字段类型、大小、注释
1.批量修改my_test库所有表的del_flag字段类型、大小、注释 SELECT CONCAT('alter table ',table_name,' modify column del_flag char(1) COMMENT \'删除标识(1正常 0删除)\';') FROM information_schema.COLUMNS where table_schema='my_test' and column_name ='del_flag' 2.复制sql执行 ...原创 2022-03-22 11:46:30 · 1623 阅读 · 0 评论 -
5分钟学会使用 redis desktop manager
redis desktop manager原创 2020-11-30 21:48:56 · 300 阅读 · 0 评论 -
redis常用类型(strings、sets、lists、hashes、sorted sets)的相关命令
redis原创 2020-11-29 14:06:42 · 536 阅读 · 0 评论 -
阿里云ESB服务器linux安装mysql5.7开放3306端口详解亲测
1.阿里云服务器ESB配置安全组原创 2020-11-08 00:51:38 · 2536 阅读 · 0 评论 -
win10 开启虚拟机Centos 进行主从实时同步测试
1.安装VMware 2.安装虚拟机Centos7 3.centos7 开启网络连接 链接: https://blog.csdn.net/sfeng95/article/details/62239539. 4.Centos7 安装MySQL详细步骤 转载: https://www.cnblogs.com/xiaobug/p/13925716.html. 5.Linux虚拟机centos7开放端口号3306,实现Mysql远程连接 链接: https://blog.csdn.net/weixin_442772原创 2021-12-29 16:43:17 · 1160 阅读 · 0 评论 -
关于Oracle数据库varchar2字段超过4000的截取处理
1.问题描述: 正式环境的旧系统使用的是oracle数据库,某表remarks备注字段最大长度是varchar2(4000),编码格式为UTF-8,可以存取4000字符和1333个中文字符串。上游系统推送的数据中,remarks的字符长度虽不超过4000字,但包含了中文字符,超过了4000,导致入库失败。经讨论过后,对不重要的字符进行截取入库处理。 2.解决方案: 截取超出的部分 if (StringUtils.lengthOfUTF8(obj.getRemarks()) >= 4000) {原创 2022-02-25 15:46:27 · 5097 阅读 · 0 评论 -
win10 安装mysql5.7.33(2021-07-17)
一、下载: 1.官方下载地址 https://downloads.mysql.com/archives/community/ 2.csdn下载路径:https://download.csdn.net/download/qq_25851237/20348956 2.解压: my.ini (注意目录路径必须用\\不能用\) [client] port=3306 default-character-set=utf8 [mysqld] # 设置为自己MYSQL的安装目录 basedir=D:\\lmp\\wo原创 2021-07-17 13:29:40 · 590 阅读 · 0 评论 -
Mysql INSERT INTO SELECT
INSERT INTO c_tmp_institution ( institution_id, institution_code, institution_name, institution_type, STATUS, responsible_person, responsible_phone, juristic_person, province, city, area, town, detail, create_time ) SELECT REPLACE( uuid(),原创 2021-05-20 09:43:12 · 508 阅读 · 0 评论 -
Mysql判断所有表或表字段包含大写sql
mysql 判断所有表或表字段包含大写的写法: BINARY + REGEXP select * from information_schema.COLUMNS where table_schema <> 'information_schema' and ( BINARY table_name REGEXP '[A-Z]' or BINARY column_name REGEXP '[A-Z]' ); ...原创 2021-02-23 13:49:22 · 418 阅读 · 0 评论 -
Mysql中Regexp常见用法
原文: https://www.jb51.net/article/180533.htm. 1.1模糊匹配,包含特定字符串 查找content字段中包含“车友俱乐部”的记录 select * from club_content where content regexp ‘车友俱乐部’ 此时的regexp与like的以下用法是等同的 select * from club_content where content like ‘%车友俱乐部%’ 1.2模糊匹配,以特定字符串开头 查找content字段中以原创 2021-02-23 12:04:42 · 1997 阅读 · 0 评论 -
使用navicat快速比对同步2个mysql库的数据及结构
1.单表表结构修改同步语句 2.多表表结构同步语句 3.两个库数据同步(仅支持小量数据)原创 2020-12-24 01:11:35 · 996 阅读 · 0 评论 -
mysql8 递归查询父子集(临时表with recursive temp as)
背景 开发过程经常会遇到,需要查询某条记录parent_id相关联的父集数据或子集数据(例如层级数据:地区、菜单、评论、多次回访任务等),可使用mysql8的临时表(with recursive temp as)特性去查询。 1、Mysql 中需要使用 WITH RECURSIVE 2、Oracle数据库中可使用START [Param] CONNECT BY PRIOR 引入 计算1到100的累加的结果。 WITH RECURSIVE t(n) AS ( //t为我们结果表,n为字段,可以只指定表明不原创 2020-12-23 23:50:49 · 2431 阅读 · 0 评论 -
mysql/oracle使用 navicat比对表数据结构及表结构同步
一、工具–>结构同步 二、选择源数据库和目标数据库 三、查看比对信息 四、同步语句脚本原创 2020-12-16 00:13:08 · 1562 阅读 · 0 评论 -
oracle常用函数实例
1.row_number() over(partition by 分组参数 order by 排序参数 [desc]) select t.*, (row_number() over(partition by TO_CHAR(T.CREATE_TIME,'yyyyMMdd') order by t.CREATE_TIME DESC)) rn from t_table t w...原创 2020-05-07 17:44:12 · 243 阅读 · 0 评论
分享