cancel
Showing results for 
Search instead for 
Did you mean: 

how to fetch all columns except one or a group of columns in sap hana

govardan_raj
Contributor

hi Team,

on using select * from TABLE_A , we get all columns in that table.

But am interested only on group of columns , i.e this TABLE_A has 30 columns, in that except one column rest other 29 columns I need, do we have any query options with key word except ?

straight query is SELECT ,COL1,COL2.......COL29 FROM TABLE_A , where we have to specify all 29 columns name.

Am using SAP HANA Data Base.

Regard

Govardan

Accepted Solutions (0)

Answers (2)

Answers (2)

adamlin
Explorer
0 Kudos

Hi,

I am also very interested about this topic, as once you specify one or more fields in a table you need to specify the entire field list, it will be interest to see if HANA SQL syntax can be enhanced to address partial field set selection or exclusion.

very often now days I want to do the following->

select A.*(first 30 fields),

B.* (10 fields was in a but now to be replaced from fields inside table b),

A*(remaining 5 fields)

A left outer join B ..

Thanks

chris_keating
Advisor
Advisor
0 Kudos

There is no a mechanism to define a SELECT LIST based on an exclusion of specific columns. See select_list in the SELECT statement documentation.