Updated on 2022-07-18 GMT+08:00
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.
Parent topic: DML
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot