Answer the question
In order to leave comments, you need to log in
How can one give a name to the subcolumns that will be displayed using such a .* construction in sql?
There is a nested column, for example, the name of this column is food. The food column contains 2 nested columns: Milk and Oil
To display these sub-columns, you can use the following constructions:
select food.* from table
Either
select food.Milk, food.Oil from table
But, I need the names of these output columns to be food_Milk and food_Oil
This can be implemented like this:
select food.Milk as food_Milk, food.Oil as food_Oil from table
select food.Milk as food_Milk, food.Oil as food_Oil from table
select food.* from table
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question