Select All from Sub-query
Hi,
I'm trying to figure out if it's possible for me to select all the columns from a sub-query.
I imagine if it were possible it'd be something like this:
Do I have to name all the columns?
4 Replies
You can just do
.select()
and that should get you every column defined in subQuery
@Mario564 My bad I didn't explain correctly what I'm trying to do. The problem I have with that solution is I want to add other columns to the select but get all the columns from the sub-query as well.
For instance:
I thought there might be a function like
.all()
on the sub-query that would let me do this, but I can't seem to find an easy solution like that.Oh, I see what you mean now. We only have a function gets all table columns but not for subqueries or views.
did you ever figure this out?