mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-10-10 16:33:23 +08:00
sql语法高亮
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div class="m-bg">
|
||||
<h1>SQL WHERE 子句</h1>
|
||||
<p class="intro">WHERE 子句用于过滤记录。</p> <h2>SQL WHERE 子句</h2> <p>WHERE 子句用于提取那些满足指定标准的记录。</p> <h3>SQL WHERE 语法</h3> <div class="code notranslate"><pre><div> SELECT <em>column_name</em>,<em>column_name</em><br/> FROM <em>table_name</em><br/> WHERE <em>column_name operator value</em>;</div></pre></div> <h2>演示数据库</h2> <p>在本教程中,我们将使用众所周知的 Northwind 样本数据库。</p> <p>下面是选自 "Customers" 表的数据:</p> <table class="reference notranslate">
|
||||
<p class="intro">WHERE 子句用于过滤记录。</p> <h2>SQL WHERE 子句</h2> <p>WHERE 子句用于提取那些满足指定标准的记录。</p> <h3>SQL WHERE 语法</h3> <div class="code notranslate"><pre><code class="language-sql"><div> SELECT <em>column_name</em>,<em>column_name</em><br/> FROM <em>table_name</em><br/> WHERE <em>column_name operator value</em>;</div></code></pre></div> <h2>演示数据库</h2> <p>在本教程中,我们将使用众所周知的 Northwind 样本数据库。</p> <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>
|
||||
@@ -16,7 +16,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>WHERE 子句实例</h2> <p>下面的 SQL 语句从 "Customers" 表中选取国家为 "Mexico" 的所有客户:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><div class="example_code notranslate"> SELECT * FROM Customers<br/> WHERE Country='Mexico';</div></pre> </div> <h2>文本字段 vs. 数值字段</h2> <p>SQL 使用单引号来环绕文本值(大部分数据库系统也接受双引号)。</p> <p>如果是数值字段,请不要使用引号。</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><div class="example_code notranslate"> SELECT * FROM Customers<br/> WHERE CustomerID=1;</div></pre> </div> <h2>WHERE 子句中的运算符</h2> <p>下面的运算符可以在 WHERE 子句中使用:</p> <table class="reference notranslate">
|
||||
<h2>WHERE 子句实例</h2> <p>下面的 SQL 语句从 "Customers" 表中选取国家为 "Mexico" 的所有客户:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><code class="language-sql"><div class="example_code notranslate"> SELECT * FROM Customers<br/> WHERE Country='Mexico';</div></code></pre> </div> <h2>文本字段 vs. 数值字段</h2> <p>SQL 使用单引号来环绕文本值(大部分数据库系统也接受双引号)。</p> <p>如果是数值字段,请不要使用引号。</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><code class="language-sql"><div class="example_code notranslate"> SELECT * FROM Customers<br/> WHERE CustomerID=1;</div></code></pre> </div> <h2>WHERE 子句中的运算符</h2> <p>下面的运算符可以在 WHERE 子句中使用:</p> <table class="reference notranslate">
|
||||
<tr>
|
||||
<th width="20%">运算符</th> <th width="80%">描述</th> </tr>
|
||||
<tr>
|
||||
|
Reference in New Issue
Block a user