开发者

Sybase SQL union of two different tables

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜