sql語句UNION
时间: 2023-09-11 08:07:15 浏览: 83
SQL语句中的UNION操作符用于合并两个或多个SELECT语句的结果。UNION要求每个SELECT语句具有相同数量和顺序的列,并且这些列的数据类型也必须相似。UNION会去除重复的行,而UNION ALL不会去重,保留所有行。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [sql的union用法](https://blog.csdn.net/dcwbi40268/article/details/102288235)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [SQL语句中union all和union的区别以及用法](https://blog.csdn.net/weixin_44023680/article/details/112095466)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文