上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 46 下一页

2020年9月30日

SQL---Miscellaneous Functions

摘要: 1、DEFAULT 返回指定字段的默认值 DEFAULT(col_name) 2、UUID Returns a Universal Unique Identifier (UUID) generated according to RFC 4122 阅读全文

posted @ 2020-09-30 14:52 anpeiyong 阅读(112) 评论(0) 推荐(0)

SQL---json函数

摘要: 查看某个key的值等于多少 JSON_EXTRACT(字段名, '$.isCopy') = xxx 示例:SELECT * FROM 表名 WHERE `parent_id` is NULL and JSON_EXTRACT(ext, '$.isCopy') = true 查看某个key是否存在 J 阅读全文

posted @ 2020-09-30 14:45 anpeiyong 阅读(185) 评论(0) 推荐(0)

SQL---Information Functions(信息函数)

摘要: 1、CONNECTION_ID() 返回当前连接的线程id 2、DATABASE() 返回当前使用的数据库名称 3、LAST_INSERT_ID() 最后一次新增列的值 阅读全文

posted @ 2020-09-30 14:41 anpeiyong 阅读(178) 评论(0) 推荐(0)

SQL---Flow Control Functions(控制流函数)

摘要: 1、case CASE value WHEN compare_value THEN result [WHEN compare_value THEN result ...] [ELSE result] END 2、if IF(表达式,expr2,expr3) 表达式为true,返回expr2; 表达式 阅读全文

posted @ 2020-09-30 14:21 anpeiyong 阅读(232) 评论(0) 推荐(0)

SQL---Type Conversion in Expression Evaluation(类型转换)

摘要: 1、mysql自动转换类型 1.1、string -> number select 1+'1' 结果:2 1.2、number -> string SELECT CONCAT(2,' test'); 结果:2 test 2、cast() CAST(expr AS type) 3、convert 不同 阅读全文

posted @ 2020-09-30 14:11 anpeiyong 阅读(203) 评论(0) 推荐(0)

Mysql---存储过程

摘要: -- 创建循环存储过程 create procedure pro12() begin declare i int; set i = 0; while i<20000 do insert into test_demo (name, job) values ('jack5', 'job'); set i 阅读全文

posted @ 2020-09-30 10:19 anpeiyong 阅读(165) 评论(0) 推荐(0)

Mysql---MysqlServer信息

摘要: 1、锁信息 show status like '%lock%'; show status like 'innodb_row_lock%'; show OPEN TABLES where In_use > 0; show status like 'table%'; 阅读全文

posted @ 2020-09-30 08:53 anpeiyong 阅读(102) 评论(0) 推荐(0)

2020年9月29日

Mysql---MySQL sys Schema

摘要: 1、概述 1.1、MySQL 5.7.7及更高版本包括sys schema,这是一组 帮助DBA和开发人员解释Performance schema收集的数据的对象。 用途:sys schema对象可用于典型的调优和诊断用例。 此schema中的对象包括: 将Performance Schema数据汇 阅读全文

posted @ 2020-09-29 10:50 anpeiyong 阅读(163) 评论(0) 推荐(0)

Mysql---MySQL Performance Schema

摘要: 1、概述 1.1、The MySQL Performance Schema is a feature for monitoring MySQL Server execution at a low level. MySQL 5.5开始新增一个数据库:PERFORMANCE_SCHEMA,主要用于收集数 阅读全文

posted @ 2020-09-29 10:49 anpeiyong 阅读(106) 评论(0) 推荐(0)

2020年9月27日

Mysql---information_schema

摘要: 1、概述 1.1、INFORMATION_SCHEMA provides access to database metadata, information about the MySQL server such as the name of a database or table, the data 阅读全文

posted @ 2020-09-27 14:42 anpeiyong 阅读(124) 评论(0) 推荐(0)

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 46 下一页

导航