摘要: CentOS 设置系统时间与网络时间同步 一、Linux的时间分为(两种) System Clock(系统时间) 指当前Linux Kernel中的时间 Real Time Clock (硬件时间,简称RTC) 主板上有电池供电的时间 二、查看系统时间的命令 系统时间指令:# date 设置系统时间 阅读全文
posted @ 2024-03-04 22:53 yikes_ygr 阅读(6947) 评论(2) 推荐(0)
摘要: 1.sql脚本 一. 通过sql脚本,查出所有表的功能,并编写插入修改的联合主键,sql select concat('ALTER table ', TABLE_NAME, ' DROP PRIMARY KEY ', ',' , 'ADD PRIMARY KEY (`id`, `org_id`)' 阅读全文
posted @ 2024-02-26 16:15 yikes_ygr 阅读(414) 评论(0) 推荐(0)
摘要: ### 一、java代码 public class GeneratorUtil { public static void generatorCode(String projectPath, String url, String name, String password, List tables, 阅读全文
posted @ 2023-08-18 00:35 yikes_ygr 阅读(116) 评论(0) 推荐(0)
摘要: -- 添加联合唯一索引 alter table add unique index (`name`, `no`, `org_id`); -- 删除索引 ALTER TABLE DROP INDEX ; 阅读全文
posted @ 2023-08-17 20:38 yikes_ygr 阅读(299) 评论(0) 推荐(0)
摘要: -- 查询进行 SHOW PROCESSLIST; -- 删除进程 kill 22459; -- 查找正在进行的 select * from information_schema.innodb_trx; 阅读全文
posted @ 2023-08-17 10:07 yikes_ygr 阅读(98) 评论(0) 推荐(0)
摘要: -- 查询某一库中所有表的名称, SELECT a.TABLE_SCHEMA ,a.TABLE_NAME ,a.TABLE_COMMENT FROM information_schema.`TABLES` a WHERE a.table_type = 'BASE TABLE' AND a.TABLE 阅读全文
posted @ 2023-08-17 10:06 yikes_ygr 阅读(131) 评论(0) 推荐(0)
摘要: -- 查询构建批量删除表语句(根据数据库名称) ``` select concat('delete from ', TABLE_NAME, ' where org_id = "" ', ';') from information_schema.TABLES where TABLE_SCHEMA = 阅读全文
posted @ 2023-07-11 00:14 yikes_ygr 阅读(31) 评论(0) 推荐(0)
摘要: -- 添加联合唯一索引 alter table b_report_file add unique index nc (`name`, `code`, `org_id`); -- 删除索引 ALTER TABLE b_report_file DROP INDEX nc; 阅读全文
posted @ 2023-06-16 15:48 yikes_ygr 阅读(20) 评论(0) 推荐(0)
摘要: #### 一、代码 ``` -- 报工设置,添加数据 set @org_id = '租户id'; set @created_user = 'yike'; set @updated_user = 'yike'; set @dispatch_list_id = ; set @process_name = 阅读全文
posted @ 2023-06-07 14:20 yikes_ygr 阅读(126) 评论(0) 推荐(0)
摘要: #### 一、输入查询语句,查看是否有数据被上锁 - select * from information_schema.innodb_trx; ![image](https://img2023.cnblogs.com/blog/2468225/202305/2468225-2023052411402 阅读全文
posted @ 2023-05-24 11:41 yikes_ygr 阅读(18) 评论(0) 推荐(0)