0

I am doing an autojoin on a table (lets say with table aliases current, prev, next) but am only interested in the columns of current. Is there a way (without explicitly enumerating them) to limit the columns of the result set to that of current? Something less complex (no metatable querying or even something that is entirely DB agnostic) than this: sql select with column name like would be fantastic. As I impose some specific constraints on my requirement (select all colums of the original/current table), my hope is that there is something easy that I am missing. In the end, I'd be happy with a Postgres specific solution as well.

Using Postgres, a statment like

 SELECT current FROM ...

indeed nearly provides what I want except that everything now is merged into a single comma separated text column.

Community
  • 1
  • 1
user462982
  • 1,635
  • 1
  • 16
  • 26

1 Answers1

2

Sure this is possible:

select current.*
from some_table current
   join other_table prev on prev.fid = current.id
   join third_table nxt on nxt.oid = prev.id