doc-exports/docs/ddm/umn/ddm_08_0010.html
Ru, Li Yi 4b09a03a51 ddm_umn
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-04-11 11:39:26 +00:00

37 lines
2.0 KiB
HTML

<a name="ddm_08_0010"></a><a name="ddm_08_0010"></a>
<h1 class="topictitle1">SELECT JOIN Syntax</h1>
<div id="body1597045079936"><div class="section" id="ddm_08_0010__section1470113220458"><h4 class="sectiontitle">Common Syntax</h4><p id="ddm_08_0010__p116711138181216">table_references:</p>
<pre class="screen" id="ddm_08_0010__screen5924175061215">table_reference [, table_reference] ...</pre>
<p id="ddm_08_0010__p467114387121">table_reference:</p>
<pre class="screen" id="ddm_08_0010__screen19757155710122">table_factor | join_table</pre>
<p id="ddm_08_0010__p16671153891215">table_factor:</p>
<pre class="screen" id="ddm_08_0010__screen23271146136">tbl_name [[AS] alias]
| table_subquery [AS] alias
| ( table_references )</pre>
<p id="ddm_08_0010__p1367210383123">join_table:</p>
<pre class="screen" id="ddm_08_0010__screen14781142110130">table_reference [INNER | CROSS] JOIN table_factor [join_condition]
| table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition
| table_reference [{LEFT|RIGHT} [OUTER]] JOIN table_factor</pre>
<p id="ddm_08_0010__p66721538101211">join_condition:</p>
<pre class="screen" id="ddm_08_0010__screen155441027111314">ON conditional_expr
| USING (column_list)</pre>
</div>
<div class="section" id="ddm_08_0010__section18123141258"><h4 class="sectiontitle">Syntax Restrictions</h4><p id="ddm_08_0010__p14579131622515">SELECT STRAIGHT_JOIN and NATURAL JOIN are not supported.</p>
</div>
<div class="section" id="ddm_08_0010__section1236614481944"><h4 class="sectiontitle">Example</h4><pre class="screen" id="ddm_08_0010__screen56891436462">select id,name from test1 where id=1;
select distinct id,name from test1 where id&gt;=1;
select id,name from test1 order by id limit 2 offset 2;
select id,name from test1 order by id limit 2,2;
select 1+1,'test',id,id*1.1,now() from test1 limit 3;
select current_date,current_timestamp;
select abs(sum(id)) from test1;</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_08_0004.html">DML</a></div>
</div>
</div>