Hive How to select all but one column?

前端 未结 2 593
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 11:40

Suppose my table looks something like:

Col1 Col2 Col3.....Col20 Col21

Now I want to select all but Col21. I want to change it to unix_timestamp

2条回答
  •  深忆病人
    2021-02-04 12:02

    In case you want to drop multiple columns on which you are joining

    select
        tb1.*,
        tb2.`(col1|col2)?+.+`
    from
         tb1 left join tb2 on
        tb1.col1 = tb2.col1
        and tb1.col2 = tb2.col2
    

提交回复
热议问题