摘要: 平时查询一些系统表或视图,可以使用字段名或者表名进行模糊查询 根据表或视图关键字查询 select table_catalog,table_schema,table_name,table_type from information_schema.tables where table_type in 阅读全文
posted @ 2025-06-05 23:28 kahnyao 阅读(78) 评论(0) 推荐(0)
摘要: 相关参数说明 innodb_large_prefix Command-Line Format --innodb-large-prefix=ON Deprecated Yes System Variable innodb_large_prefix Scope Global Dynamic Yes Ty 阅读全文
posted @ 2025-06-03 00:28 kahnyao 阅读(214) 评论(0) 推荐(0)
摘要: 支持的匹配模式(常用) 定位符 符号 描述 ^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 '\n' 或 '\r' 之后的位置。 $ 匹配输入字符串的结束位置。如果设置了RegExp 对象的 Multiline 属性,$ 也匹配 '\n' 或 ' 阅读全文
posted @ 2025-05-30 01:34 kahnyao 阅读(497) 评论(0) 推荐(0)
摘要: 查询自定义对象ddl时间 select pc.relname, case object_type when 'r' then '普通表' when 'i' then '索引' when 's' then '序列' when 'v' then '视图' when 'p' then '存储过程和函数' 阅读全文
posted @ 2025-05-29 23:18 kahnyao 阅读(85) 评论(0) 推荐(0)
摘要: unix_timestamp MySQL 中的 unix_timestamp() 函数返回自 1970 年 1 月 1 日 UTC 时间以来的秒数。在 PostgreSQL 中,可以通过 EXTRACT 和 EPOCH 来获取这一信息。 CREATE OR REPLACE FUNCTION unix 阅读全文
posted @ 2025-05-28 22:52 kahnyao 阅读(150) 评论(0) 推荐(0)
摘要: 创建表结构 drop table if exists history; drop table if exists history_str; drop table if exists history_log; drop table if exists history_text; drop table 阅读全文
posted @ 2025-05-28 21:28 kahnyao 阅读(38) 评论(0) 推荐(0)
摘要: 创建表结构 drop table if exists history; drop table if exists history_str; drop table if exists history_log; drop table if exists history_text; drop table 阅读全文
posted @ 2025-05-28 21:27 kahnyao 阅读(28) 评论(0) 推荐(0)
摘要: MongoDB生成测试数据 使用的函数 函数 说明 Math.random() 返回0~1之间的随机数 Math.floor() 向上取整 new Date() UTC时间(0时区) 示例 字段 类型 说明 Math.floor(Math.random() * 100) 数值 100内的随机整数 f 阅读全文
posted @ 2025-05-17 10:11 kahnyao 阅读(74) 评论(0) 推荐(0)
摘要: 方法1 -- 创建表 create table TestTable as select rownum as id, to_char(sysdate + rownum/24/3600, 'yyyy-mm-dd hh24:mi:ss') as inc_datetime, trunc(dbms_rando 阅读全文
posted @ 2025-05-17 10:10 kahnyao 阅读(126) 评论(0) 推荐(0)
摘要: 构造测试数据 相关函数 函数 说明 rand() 随机函数,会生成0~1之间的随机数 md5(input) 散列函数,根据输入值的不同,生成不同的32位字符串(但只有09,af共16种字符) substring(string, position, length) 字符串截取函数,会截取字符串stri 阅读全文
posted @ 2025-05-17 10:09 kahnyao 阅读(64) 评论(0) 推荐(0)