doc-exports/docs/ddm/umn/ddm_08_0011.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

1.1 KiB

SELECT UNION Syntax

Common Syntax

SELECT ...UNION [ALL | DISTINCT] 
SELECT ...[UNION [ALL | DISTINCT] SELECT ...]

Example

select userid from user union select orderid from ordertbl order by userid;
select userid from user union (select orderid from ordertbl group by orderid) order by userid;

Syntax Restrictions

SELECT statements in UNION do not support duplicate column names.