簡體   English   中英

Sybase SQL 兩個不同表的並集

[英]Sybase SQL union of two different tables

是否可以從 Sybase SQL 中具有不同列數、值和列類型的兩個表進行聯合?

當然,只要聯合的頂部和底部的列可以轉換為相同的類型。 例如:

select  intColumn as col1
,       charColumn as col2
,       decimalColumn as col3
from    Table1
union all
select  null
,       'Halelujah'
,       doubleColumn
from    Table2

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM