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 AVG() 函数</h1>
<h2>AVG() 函数</h2> <p>AVG() 函数返回数值列的平均值。</p> <h3>SQL AVG() 语法</h3> <div class="code notranslate"><pre><div> SELECT AVG(column_name) FROM table_name</div></pre></div> <h2>演示数据库</h2> <p>在本教程中,我们将使用众所周知的 Northwind 样本数据库。</p> <p>下面是选自 "Products" 表的数据:</p> <table class="reference notranslate">
<h2>AVG() 函数</h2> <p>AVG() 函数返回数值列的平均值。</p> <h3>SQL AVG() 语法</h3> <div class="code notranslate"><pre><code class="language-sql"><div> SELECT AVG(column_name) FROM table_name</div></code></pre></div> <h2>演示数据库</h2> <p>在本教程中,我们将使用众所周知的 Northwind 样本数据库。</p> <p>下面是选自 "Products" 表的数据:</p> <table class="reference notranslate">
<tr>
<th>ProductID</th> <th>ProductName</th> <th>SupplierID</th> <th>CategoryID</th> <th>Unit</th> <th>Price</th> </tr>
<tr>
@@ -14,6 +14,6 @@
<tr>
<td>5</td> <td>Chef Anton's Gumbo Mix</td> <td>2</td> <td>2</td> <td>36 boxes</td> <td>25</td> </tr>
</table>
<h2>SQL AVG() 实例</h2> <p>下面的 SQL 语句从 "Products" 表的 "Price" 列获取平均值:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><div class="example_code notranslate"> SELECT AVG(Price) AS PriceAverage FROM Products; </div></pre> </div> <p>下面的 SQL 语句选择价格高于平均价格的 "ProductName" 和 "Price" 记录:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><div class="example_code notranslate"> SELECT ProductName, Price FROM Products<br/>WHERE Price&gt;(SELECT AVG(Price) FROM Products); </div></pre> </div> <br/><div class="text-center padding-10 margin-t-5">
<h2>SQL AVG() 实例</h2> <p>下面的 SQL 语句从 "Products" 表的 "Price" 列获取平均值:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><code class="language-sql"><div class="example_code notranslate"> SELECT AVG(Price) AS PriceAverage FROM Products; </div></code></pre> </div> <p>下面的 SQL 语句选择价格高于平均价格的 "ProductName" 和 "Price" 记录:</p> <div class="example margin-b-10"> <h2 class="example">实例</h2> <pre><code class="language-sql"><div class="example_code notranslate"> SELECT ProductName, Price FROM Products<br/>WHERE Price&gt;(SELECT AVG(Price) FROM Products); </div></code></pre> </div> <br/><div class="text-center padding-10 margin-t-5">
</div>
</div>