doc-exports/docs/dli/sqlreference/dli_08_0073.html
Su, Xiaomeng 76a5b1ee83 dli_sqlreference_20240227
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-03-27 22:02:33 +00:00

44 lines
4.5 KiB
HTML

<a name="dli_08_0073"></a><a name="dli_08_0073"></a>
<h1 class="topictitle1">Viewing a Specified Database</h1>
<div id="body8662426"><div class="section" id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_s03d52595b4c84ebfba33084284b180a6"><h4 class="sectiontitle">Function</h4><p id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_a9ce0bf9ef7e84a519ccddf2ca6e291b1">This syntax is used to view the information about a specified database, including the database name and database description.</p>
</div>
<div class="section" id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_s026a66f5f4a2491588a3bbe7aa137c49"><h4 class="sectiontitle">Syntax</h4><div class="codecoloring" codetype="Sql" id="dli_08_0073__en-us_topic_0114776167_screen144138522810"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">DESCRIBE</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="p">[</span><span class="n">EXTENDED</span><span class="p">]</span><span class="w"> </span><span class="n">db_name</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_s5d84117cf4644817826303ec1f0ca9ae"><h4 class="sectiontitle">Keywords</h4><p id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_aeb9d5ecdb8234ea1808816b9571d2030">EXTENDED: Displays the database properties.</p>
</div>
<div class="section" id="dli_08_0073__en-us_topic_0114776170_section1130610201331"><h4 class="sectiontitle">Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0073__en-us_topic_0114776170_table137579239220" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter</caption><thead align="left"><tr id="dli_08_0073__en-us_topic_0114776170_row17564232219"><th align="left" class="cellrowborder" valign="top" width="21.3%" id="mcps1.3.4.2.2.3.1.1"><p id="dli_08_0073__en-us_topic_0114776170_p3756152318220">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="78.7%" id="mcps1.3.4.2.2.3.1.2"><p id="dli_08_0073__en-us_topic_0114776170_p167561023629">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_08_0073__en-us_topic_0114776170_row1375611231219"><td class="cellrowborder" valign="top" width="21.3%" headers="mcps1.3.4.2.2.3.1.1 "><p id="dli_08_0073__en-us_topic_0114776170_p107564232216">db_name</p>
</td>
<td class="cellrowborder" valign="top" width="78.7%" headers="mcps1.3.4.2.2.3.1.2 "><p id="dli_08_0073__en-us_topic_0114776170_p1575614231121">Database name, which consists of letters, digits, and underscores (_). The value cannot contain only digits or start with a digit or underscore (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_s877bd28c18ce42269043afe2d8196870"><h4 class="sectiontitle">Precautions</h4><p id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_ad20e1a3789564bc084cb7639d13679ca">If the database to be viewed does not exist, the system reports an error.</p>
</div>
<div class="section" id="dli_08_0073__en-us_topic_0114776167_en-us_topic_0093946974_sbcf52ad4d1b8489f8e5176727b88825c"><h4 class="sectiontitle">Example</h4><ol id="dli_08_0073__ol142866406714"><li id="dli_08_0073__li84357101468">Create a database, for example, <strong id="dli_08_0073__b10796173717357">testdb</strong>, by referring to <a href="dli_08_0071.html#dli_08_0071__en-us_topic_0114776165_en-us_topic_0093946907_se85f897bfc724638829c13a14150cab6">Example</a>.</li><li id="dli_08_0073__li748413465714">Run the following statement to query information about the <strong id="dli_08_0073__b1296713973510">testdb</strong> database:<div class="codecoloring" codetype="Sql" id="dli_08_0073__en-us_topic_0114776167_screen10896181093"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">DESCRIBE</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="n">testdb</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_0070.html">Databases</a></div>
</div>
</div>