sql语法高亮

This commit is contained in:
fofolee
2019-05-07 10:15:08 +08:00
parent 6cf279e189
commit 2bf87e1e25
67 changed files with 128 additions and 128 deletions

View File

@@ -1,6 +1,6 @@
<div class="m-bg">
<h1>SQL DELETE 语句</h1>
<p class="intro">DELETE 语句用于删除表中的记录。</p> <h2>SQL DELETE 语句</h2> <p>DELETE 语句用于删除表中的行。</p> <h3>SQL DELETE 语法</h3> <div class="code notranslate"><pre><div> DELETE FROM <em>table_name</em><br/> WHERE <em>some_column</em>=<em>some_value</em>;</div></pre></div> <br/><table class="lamp"><tr>
<p class="intro">DELETE 语句用于删除表中的记录。</p> <h2>SQL DELETE 语句</h2> <p>DELETE 语句用于删除表中的行。</p> <h3>SQL DELETE 语法</h3> <div class="code notranslate"><pre><code class="language-sql"><div> DELETE FROM <em>table_name</em><br/> WHERE <em>some_column</em>=<em>some_value</em>;</div></code></pre></div> <br/><table class="lamp"><tr>
<th width="34"><span aria-hidden="true" class="g-bg glyphicon glyphicon-flag margin-l-5"></span></th> <td> <strong>请注意 SQL DELETE 语句中的 WHERE 子句!</strong><br/> WHERE 子句规定哪条记录或者哪些记录需要删除。如果您省略了 WHERE 子句,所有的记录都将被删除!</td> </tr></table>
<h2>演示数据库</h2> <p>在本教程中,我们将使用众所周知的 Northwind 样本数据库。</p> <p>下面是选自 "Customers" 表的数据:</p> <table class="reference notranslate">
<tr>
@@ -18,7 +18,7 @@
<tr>
<td>5</td> <td>Berglunds snabbköp</td> <td>Christina Berglund</td> <td>Berguvsvägen 8</td> <td>Luleå</td> <td>S-958 22</td> <td>Sweden</td> </tr>
</table>
<h2>SQL DELETE 实例</h2> <p>假设我们要从 "Customers" 表中删除客户 "Alfreds Futterkiste"。</p> <p>我们使用下面的 SQL 语句:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><div class="example_code notranslate"> DELETE FROM Customers<br/> WHERE CustomerName='Alfreds Futterkiste' AND ContactName='Maria Anders'; </div></pre> </div> <p>现在,"Customers" 表如下所示:</p> <table class="reference notranslate">
<h2>SQL DELETE 实例</h2> <p>假设我们要从 "Customers" 表中删除客户 "Alfreds Futterkiste"。</p> <p>我们使用下面的 SQL 语句:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><code class="language-sql"><div class="example_code notranslate"> DELETE FROM Customers<br/> WHERE CustomerName='Alfreds Futterkiste' AND ContactName='Maria Anders'; </div></code></pre> </div> <p>现在,"Customers" 表如下所示:</p> <table class="reference notranslate">
<tr>
<th>CustomerID</th> <th>CustomerName</th> <th>ContactName</th> <th>Address</th> <th>City</th> <th>PostalCode</th> <th>Country</th> </tr>
<tr>
@@ -31,6 +31,6 @@
<tr>
<td>5</td> <td>Berglunds snabbköp</td> <td>Christina Berglund</td> <td>Berguvsvägen 8</td> <td>Luleå</td> <td>S-958 22</td> <td>Sweden</td> </tr>
</table>
<h2>删除所有数据</h2> <p>您可以在不删除表的情况下,删除表中所有的行。这意味着表结构、属性、索引将保持不变:</p> <div class="code notranslate"><pre><div> DELETE FROM <em>table_name</em>;<br/><br/> or<br/><br/> DELETE * FROM <em>table_name</em>;</div></pre></div> <p><b>注释:</b>在删除记录时要格外小心!因为您不能重来!</p> <div class="text-center padding-10 margin-t-5">
<h2>删除所有数据</h2> <p>您可以在不删除表的情况下,删除表中所有的行。这意味着表结构、属性、索引将保持不变:</p> <div class="code notranslate"><pre><code class="language-sql"><div> DELETE FROM <em>table_name</em>;<br/><br/> or<br/><br/> DELETE * FROM <em>table_name</em>;</div></code></pre></div> <p><b>注释:</b>在删除记录时要格外小心!因为您不能重来!</p> <div class="text-center padding-10 margin-t-5">
</div>
</div>