两个字段中如何取一个最小的 复职给另一个表的字段

两个字段中怎么取一个最小的 复职给另一个表的字段例如a表ab12b表c1[解决办法]select case when a b then

两个字段中怎么取一个最小的 复职给另一个表的字段
例如
a表
    a         b    
    1         2

b表

    c

    1




[解决办法]
select case when a <b then a else b end from tb
[解决办法]
select min(col) col from
(
select a from a
union all
select b from a
) t