Markdown表格语法介绍
基本语法:
|属性1 |属性2 |属性3 |
|value1|value1|value1|
|value1|value1|value1|
Markdown虽然没有合并单元格的语法,但是Markdown是兼容HTML的,因此,我们可以通过HTML的方式实现单元格合并。
rowspan="3"表示这一行往右三个单元格合为一个
colspan="3"表示这一列往下三个单元格合为一个
例:
<table>
<tr >
<td colspan="3">事务1</td>
<td colspan="3">事务2</td>
</tr>
<tr >
<td colspan="3">begin;</td>
<td colspan="3">begin;</td>
</tr>
<tr >
<td colspan="3">set session transaction isolation level READ COMMITTED;//修改隔离级别</td>
<td colspan="3">set session transaction isolation level READ COMMITTED;//修改隔离级别</td>
</tr>
<tr >
<td colspan="3">select * from t_isolation_level where id = 99;</td>
<td rowspan="3" colspan="3"></td>
</tr>
<tr>
<td>id</th>
<td>name</th>
<td>class_id</th>
</tr>
<tr>
<td>1</th>
<td>范统</th>
<td>99</th>
</tr>
<tr>
<td rowspan="2" colspan="3"></th>
<td colspan="3">insert into t_isolation_level VALUES(2,'菜镶',99);</th>
</tr>
<tr >
<td colspan="3">commit;</th>
</tr>
<tr >
<td colspan="3">select * from t_isolation_level where id = 99;</td>
<td rowspan="4" colspan="3"></td>
</tr>
<tr>
<td>id</th>
<td>name</th>
<td>class_id</th>
</tr>
<tr>
<td>1</th>
<td>范统</th>
<td>99</th>
<tr>
<td>2</th>
<td>菜镶</th>
<td>99</th>
</tr>
<td colspan="3">commit;</th>
<td rowspan="5" colspan="3"></td>
</table>
效果如下:
事务1 | 事务2 | ||||
begin; | begin; | ||||
set session transaction isolation level READ COMMITTED;//修改隔离级别 | set session transaction isolation level READ COMMITTED;//修改隔离级别 | ||||
select * from t_isolation_level where id = 99; | |||||
id | name | class_id | |||
1 | 范统 | 99 | |||
insert into t_isolation_level VALUES(2,'菜镶',99); | |||||
commit; | |||||
select * from t_isolation_level where id = 99; | |||||
id | name | class_id | |||
1 | 范统 | 99 | |||
2 | 菜镶 | 99 | |||
commit; |