Merge pull request #195 from kwongtailau/master
fix mispell, strongest compulsively
This commit is contained in:
commit
fb3e30d898
@ -251,7 +251,7 @@ FROM mytable
|
|||||||
| LOWER() UPPER() | 转换为小写或者大写 |
|
| LOWER() UPPER() | 转换为小写或者大写 |
|
||||||
| LTRIM() RTIM() | 去除左边或者右边的空格 |
|
| LTRIM() RTIM() | 去除左边或者右边的空格 |
|
||||||
| LENGTH() | 长度 |
|
| LENGTH() | 长度 |
|
||||||
| SUNDEX() | 转换为语音值 |
|
| SOUNDEX() | 转换为语音值 |
|
||||||
|
|
||||||
其中, **SOUNDEX()** 是将一个字符串转换为描述其语音表示的字母数字模式的算法,它是根据发音而不是字母比较。
|
其中, **SOUNDEX()** 是将一个字符串转换为描述其语音表示的字母数字模式的算法,它是根据发音而不是字母比较。
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ GROUP BY col
|
|||||||
ORDER BY num;
|
ORDER BY num;
|
||||||
```
|
```
|
||||||
|
|
||||||
WHERE 过滤行,HAVING 过滤分组。行过滤应当先与分组过滤;
|
WHERE 过滤行,HAVING 过滤分组。行过滤应当先于分组过滤;
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT col, COUNT(*) AS num
|
SELECT col, COUNT(*) AS num
|
||||||
@ -464,7 +464,7 @@ from employee natural join department;
|
|||||||
```sql
|
```sql
|
||||||
select Customers.cust_id, Orders.order_num
|
select Customers.cust_id, Orders.order_num
|
||||||
from Customers left outer join Orders
|
from Customers left outer join Orders
|
||||||
on Customers.cust_id = Orders.curt_id;
|
on Customers.cust_id = Orders.cust_id;
|
||||||
```
|
```
|
||||||
|
|
||||||
如果需要统计顾客的订单数,使用聚集函数。
|
如果需要统计顾客的订单数,使用聚集函数。
|
||||||
@ -473,7 +473,7 @@ on Customers.cust_id = Orders.curt_id;
|
|||||||
select Customers.cust_id,
|
select Customers.cust_id,
|
||||||
COUNT(Orders.order_num) as num_ord
|
COUNT(Orders.order_num) as num_ord
|
||||||
from Customers left outer join Orders
|
from Customers left outer join Orders
|
||||||
on Customers.cust_id = Orders.curt_id
|
on Customers.cust_id = Orders.cust_id
|
||||||
group by Customers.cust_id;
|
group by Customers.cust_id;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -227,13 +227,13 @@ MySQL 中提供了两种封锁粒度:行级锁以及表级锁。
|
|||||||
事务遵循两段锁协议是保证并发操作可串行化调度的充分条件。例如以下操作满足两段锁协议,它是可串行化调度。
|
事务遵循两段锁协议是保证并发操作可串行化调度的充分条件。例如以下操作满足两段锁协议,它是可串行化调度。
|
||||||
|
|
||||||
```html
|
```html
|
||||||
lock-x(A)...lock-s(B)...lock-s(c)...unlock(A)...unlock(C)...unlock(B)
|
lock-x(A)...lock-s(B)...lock-s(C)...unlock(A)...unlock(C)...unlock(B)
|
||||||
```
|
```
|
||||||
|
|
||||||
但不是必要条件,例如以下操作不满足两段锁协议,但是它还是可串行化调度。
|
但不是必要条件,例如以下操作不满足两段锁协议,但是它还是可串行化调度。
|
||||||
|
|
||||||
```html
|
```html
|
||||||
lock-x(A)...unlock(A)...lock-s(B)...unlock(B)...lock-s(c)...unlock(C)...
|
lock-x(A)...unlock(A)...lock-s(B)...unlock(B)...lock-s(C)...unlock(C)...
|
||||||
```
|
```
|
||||||
|
|
||||||
# 四、隔离级别
|
# 四、隔离级别
|
||||||
@ -331,7 +331,7 @@ select * from table ....;
|
|||||||
select * from table where ? lock in share mode;
|
select * from table where ? lock in share mode;
|
||||||
select * from table where ? for update;
|
select * from table where ? for update;
|
||||||
insert;
|
insert;
|
||||||
update ;
|
update;
|
||||||
delete;
|
delete;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user