mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 12:41:20 +08:00
website: adjust the layout. f60826e6da
This commit is contained in:
@ -72,7 +72,7 @@
|
||||
</span></code></pre>
|
||||
</div></div></div><div class="wrap h3body-exist row-span-3"><div class="wrap-header h3wrap"><h3 id="常用的"><a aria-hidden="true" tabindex="-1" href="#常用的"><span class="icon icon-link"></span></a>常用的</h3><div class="wrap-body">
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
</div></div><div class="h3wrap-body"><div class="wrap h4body-not-exist"><div class="wrap-header h4wrap"><h4 id="数据库-database"><a aria-hidden="true" tabindex="-1" href="#数据库-database"><span class="icon icon-link"></span></a>数据库 Database</h4><div class="wrap-body">
|
||||
</div></div><div class="h3wrap-body"><h4 id="数据库-database"><a aria-hidden="true" tabindex="-1" href="#数据库-database"><span class="icon icon-link"></span></a>数据库 Database</h4>
|
||||
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
|
||||
|
||||
<table><thead><tr><th align="left">:-</th><th align="left">:-</th></tr></thead><tbody><tr><td align="left"><code>CREATE DATABASE</code> db <code>;</code></td><td align="left"><code>创建</code>数据库</td></tr><tr><td align="left"><code>SHOW DATABASES;</code></td><td align="left"><code>列出</code>数据库</td></tr><tr><td align="left"><code>USE</code> db<code>;</code></td><td align="left"><code>切换</code>到数据库</td></tr><tr><td align="left"><code>CONNECT</code> db <code>;</code></td><td align="left"><code>切换</code>到数据库</td></tr><tr><td align="left"><code>DROP DATABASE</code> db<code>;</code></td><td align="left"><code>删除</code>数据库</td></tr></tbody></table>
|
||||
</div></div></div><div class="wrap h4body-not-exist"><div class="wrap-header h4wrap"><h4 id="表-table"><a aria-hidden="true" tabindex="-1" href="#表-table"><span class="icon icon-link"></span></a>表 Table</h4><div class="wrap-body">
|
||||
<h4 id="表-table"><a aria-hidden="true" tabindex="-1" href="#表-table"><span class="icon icon-link"></span></a>表 Table</h4>
|
||||
|
||||
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
|
||||
|
||||
<table><thead><tr><th align="left">:-</th><th align="left">:-</th></tr></thead><tbody><tr><td align="left"><code>SHOW TABLES;</code></td><td align="left">列出当前数据库的表</td></tr><tr><td align="left"><code>SHOW FIELDS FROM</code> t<code>;</code></td><td align="left">表的列表字段</td></tr><tr><td align="left"><code>DESC</code> t<code>;</code></td><td align="left">显示表格结构</td></tr><tr><td align="left"><code>SHOW CREATE TABLE </code>t<code>;</code></td><td align="left">显示创建表sql</td></tr><tr><td align="left"><code>TRUNCATE TABLE </code>t<code>;</code></td><td align="left">删除表中的所有数据</td></tr><tr><td align="left"><code>DROP TABLE </code>t<code>;</code></td><td align="left">删除表格</td></tr></tbody></table>
|
||||
</div></div></div><div class="wrap h4body-not-exist"><div class="wrap-header h4wrap"><h4 id="proccess"><a aria-hidden="true" tabindex="-1" href="#proccess"><span class="icon icon-link"></span></a>Proccess</h4><div class="wrap-body">
|
||||
<h4 id="proccess"><a aria-hidden="true" tabindex="-1" href="#proccess"><span class="icon icon-link"></span></a>Proccess</h4>
|
||||
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
|
||||
|
||||
<table><thead><tr><th align="left">:-</th><th align="left">:-</th></tr></thead><tbody><tr><td align="left"><code>show processlist;</code></td><td align="left">列出进程</td></tr><tr><td align="left"><code>kill</code> pid<code>;</code></td><td align="left">杀死进程</td></tr></tbody></table>
|
||||
</div></div></div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="查看-mysql-信息"><a aria-hidden="true" tabindex="-1" href="#查看-mysql-信息"><span class="icon icon-link"></span></a>查看 MySQL 信息</h3><div class="wrap-body">
|
||||
</div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="查看-mysql-信息"><a aria-hidden="true" tabindex="-1" href="#查看-mysql-信息"><span class="icon icon-link"></span></a>查看 MySQL 信息</h3><div class="wrap-body">
|
||||
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line"><span class="token comment"># 显示当前mysql的version的各种信息</span>
|
||||
</span><span class="code-line">mysql<span class="token operator">></span> status<span class="token punctuation">;</span>
|
||||
</span><span class="code-line"><span class="token comment"># 显示当前mysql的version信息</span>
|
||||
@ -418,7 +418,7 @@
|
||||
</span><span class="code-line"><span class="token keyword">ON</span> table_name TRIGGER_TYPE
|
||||
</span><span class="code-line"><span class="token keyword">EXECUTE</span> stored_procedure<span class="token punctuation">;</span>
|
||||
</span></code></pre>
|
||||
</div></div><div class="h3wrap-body"><div class="wrap h4body-not-exist"><div class="wrap-header h4wrap"><h4 id="when"><a aria-hidden="true" tabindex="-1" href="#when"><span class="icon icon-link"></span></a>WHEN</h4><div class="wrap-body">
|
||||
</div></div><div class="h3wrap-body"><h4 id="when"><a aria-hidden="true" tabindex="-1" href="#when"><span class="icon icon-link"></span></a>WHEN</h4>
|
||||
|
||||
|
||||
|
||||
@ -437,7 +437,7 @@
|
||||
|
||||
|
||||
<table><thead><tr><th align="left">:-</th><th align="left">:-</th></tr></thead><tbody><tr><td align="left"><code>BEFORE</code></td><td align="left">在事件发生前调用</td></tr><tr><td align="left"><code>AFTER</code></td><td align="left">事件发生后调用</td></tr></tbody></table>
|
||||
</div></div></div><div class="wrap h4body-not-exist"><div class="wrap-header h4wrap"><h4 id="event"><a aria-hidden="true" tabindex="-1" href="#event"><span class="icon icon-link"></span></a>EVENT</h4><div class="wrap-body">
|
||||
<h4 id="event"><a aria-hidden="true" tabindex="-1" href="#event"><span class="icon icon-link"></span></a>EVENT</h4>
|
||||
|
||||
|
||||
|
||||
@ -460,7 +460,7 @@
|
||||
|
||||
|
||||
<table><thead><tr><th align="left">:-</th><th align="left">:-</th></tr></thead><tbody><tr><td align="left"><code>INSERT</code></td><td align="left">为INSERT调用</td></tr><tr><td align="left"><code>UPDATE</code></td><td align="left">调用UPDATE</td></tr><tr><td align="left"><code>DELETE</code></td><td align="left">调用DELETE</td></tr></tbody></table>
|
||||
</div></div></div><div class="wrap h4body-not-exist"><div class="wrap-header h4wrap"><h4 id="trigger_type"><a aria-hidden="true" tabindex="-1" href="#trigger_type"><span class="icon icon-link"></span></a>TRIGGER_TYPE</h4><div class="wrap-body">
|
||||
<h4 id="trigger_type"><a aria-hidden="true" tabindex="-1" href="#trigger_type"><span class="icon icon-link"></span></a>TRIGGER_TYPE</h4>
|
||||
|
||||
|
||||
|
||||
@ -479,7 +479,7 @@
|
||||
|
||||
|
||||
<table><thead><tr><th align="left">:-</th><th align="left">:-</th></tr></thead><tbody><tr><td align="left"><code>FOR EACH ROW</code></td><td align="left">-</td></tr><tr><td align="left"><code>FOR EACH STATEMENT</code></td><td align="left">-</td></tr></tbody></table>
|
||||
</div></div></div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="管理索引"><a aria-hidden="true" tabindex="-1" href="#管理索引"><span class="icon icon-link"></span></a>管理索引</h3><div class="wrap-body">
|
||||
</div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="管理索引"><a aria-hidden="true" tabindex="-1" href="#管理索引"><span class="icon icon-link"></span></a>管理索引</h3><div class="wrap-body">
|
||||
<p>在t表的c1和c2上创建索引</p>
|
||||
<pre class="language-sql"><code class="language-sql code-highlight"><span class="code-line"><span class="token keyword">CREATE</span> <span class="token keyword">INDEX</span> idx_name
|
||||
</span><span class="code-line"><span class="token keyword">ON</span> t<span class="token punctuation">(</span>c1<span class="token punctuation">,</span>c2<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
Reference in New Issue
Block a user