
Mysql
文章平均质量分 69
Wesley@
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
MySQL高级和原理
MySQL高级 字符 my.cnf配置文件最后加上 character_set_server=utf8 修改表的字符集 mysql> alter table dubbo convert to character set 'utf8'; 权限 查看权限 mysql> select * from user\G; *************************** 1. row *************************** Host: lo原创 2021-01-14 09:00:09 · 259 阅读 · 0 评论 -
MySQL基础
Mysql Mysql 基础 Create DB CREATE database demo; 使用demo数据库 mysql> use demo Database changed Create Table create table Person ( Id_P int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) ); 描述Person表: mysql> d原创 2021-01-14 08:59:19 · 220 阅读 · 0 评论 -
一个不知名的SQL面试题
假设新建一张Scores表格,用来记录学生分数 mysql> create table Scores( Id int, Name varchar(255), Subject varchar(255), Score int ); Query OK, 0 rows affected (0.01 sec) mysql> desc Scores; +---------+--------------+------+-----+---------+-------+ | Field | Type原创 2021-01-08 18:04:16 · 138 阅读 · 1 评论 -
高性能Mysql实战----学习02
高性能Mysql实战----学习02 Mysql 锁分类 在 MySQL 中有三种级别的锁:页级锁、表级锁、行级锁。 表级锁:开销小,加锁快;不会出现死锁;锁定粒度大,发生锁冲突的概率最高,并发度最低。 会发生在:MyISAM、memory、InnoDB、BDB 等存储引擎中。 行级锁:开销大,加锁慢;会出现死锁;锁定粒度最小,发生锁冲突的概率最低,并发度最高。会发生在:InnoDB 存储引擎。 页级锁:开销和加锁时间界于表锁和行锁之间;会出现死锁;锁定粒度界于表锁和行锁之间,并发度一般。会发生转载 2020-07-16 04:47:24 · 252 阅读 · 0 评论 -
高性能Mysql实战----学习02
高性能Mysql实战----学习02原创 2020-07-15 21:14:14 · 200 阅读 · 0 评论 -
高性能Mysql实战----学习01
Mysql 高性能实战 MySQL 数据库的体系结构,如下图所示 MySQL 体系结构由 Client Connectors 层、MySQL Server 层及存储引擎层组成。 Client Connectors 层 负责处理客户端的连接请求,与客户端创建连接。目前 MySQL 几乎支持所有的连接类型,例如常见的 JDBC、Python、Go 等。 MySQL Server 层 MySQL Server 层主要包括 Connection Pool、Service & utilities、SQL转载 2020-07-14 00:52:53 · 264 阅读 · 0 评论 -
LeetCode 180. Consecutive Numbers
Description: Write a SQL query to find all numbers that appear at least three times consecutively. ±—±----+ | Id | Num | ±—±----+ | 1 | 1 | | 2 | 1 | | 3 | 1 | | 4 | 2 | | 5 | 1 | | 6 | 2 | | 7 | 2 | ±—±----+ For example, given the abo原创 2020-06-04 01:32:22 · 298 阅读 · 0 评论 -
LeetCode 178. Rank Scores
Description: Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking number should be the next consecutive integer value. In other words, there should be no “holes”原创 2020-06-04 01:20:57 · 258 阅读 · 0 评论 -
LeetCode 177. Nth Highest Salary (mysql limit 和 offset用法)
Description: Write a SQL query to get the nth highest salary from the Employee table. ±—±-------+ | Id | Salary | ±—±-------+ | 1 | 100 | | 2 | 200 | | 3 | 300 | ±—±-------+ For example, given the above Employee table, the nth highest salary wh原创 2020-06-04 00:43:10 · 233 阅读 · 0 评论 -
LeetCode 175. Combine Two Tables (SQL语句中on和where的区别)
Description: Table: Person ±------------±--------+ | Column Name | Type | ±------------±--------+ | PersonId | int | | FirstName | varchar | | LastName | varchar | ±------------±--------+ PersonId is the primary key column for this table. Ta原创 2020-06-04 00:19:37 · 285 阅读 · 0 评论