SQL exclude a column using SELECT * [except columnA] FROM tableA?

后端 未结 30 2560
花落未央
花落未央 2020-11-21 23:15

We all know that to select all columns from a table, we can use

SELECT * FROM tableA

Is there a way to exclude column(s) from a table witho

30条回答
  •  一生所求
    2020-11-21 23:59

    In Hive Sql you can do this:

    set hive.support.quoted.identifiers=none;
    select 
        `(unwanted_col1|unwanted_col2|unwanted_col3)?+.+`
    from database.table
    

    this gives you the rest cols

提交回复
热议问题