Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

22 lines
2.0 KiB
HTML

<a name="mrs_01_24205"></a><a name="mrs_01_24205"></a>
<h1 class="topictitle1">DESC: Querying a Table Structure</h1>
<div id="body0000001183607141"><p id="mrs_01_24205__p795718189259">This section describes the basic syntax and usage of the SQL statement for querying a table structure in ClickHouse.</p>
<div class="section" id="mrs_01_24205__section15731114502716"><h4 class="sectiontitle">Basic Syntax</h4><p id="mrs_01_24205__p104443476279"><strong id="mrs_01_24205__b37781647192714">DESC</strong>|<strong id="mrs_01_24205__b147789471274">DESCRIBE </strong><strong id="mrs_01_24205__b13778154717273">TABLE </strong>[<em id="mrs_01_24205__i1677804712715">database_name</em>.]<em id="mrs_01_24205__i8778114713276">table </em>[<strong id="mrs_01_24205__b107788478277">INTO </strong>OUTFILE filename] [FORMAT format]</p>
</div>
<div class="section" id="mrs_01_24205__section7415105312712"><h4 class="sectiontitle">Example</h4><pre class="screen" id="mrs_01_24205__screen93650427616">-- Query the <strong id="mrs_01_24205__b615052443114624">t1</strong> table structure.
desc t1;
┌─name────┬─type─┬─default_type─┬─default_expression ┬─comment─┬─codec_expression─┬─ttl_expression─┐
│ id │ UInt8 │ │ │ │ │ │
│ name │ UInt8 │ │ │ │ │ │
│ address │ String │ │ │ │ │ │
└───────┴────┴────────┴────────── ┴───── ┴──────────┴─────────┘</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24199.html">Common ClickHouse SQL Syntax</a></div>
</div>
</div>