postgresql - select all except for a specific column -


i have table more 20 columns, want columns except 1 i'll use in conditional expression.

select s.* (but not column1),     case when column1 null 1 else 2 end column1  tb_sample s; 

can achieve in postgresql given logic above?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -