开发者

Sybase SQL union of two different tables

开发者 https://www.devze.com 2023-03-16 07:26 出处:网络
Is it possible to make a union from two tables with开发者_Go百科 different number of columns, values and column types in Sybase SQL?Sure, as long as the columns from the top and bottom part of the uni

Is it possible to make a union from two tables with开发者_Go百科 different number of columns, values and column types in Sybase SQL?


Sure, as long as the columns from the top and bottom part of the union can be converted to the same type. For example:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号