Answer the question
In order to leave comments, you need to log in
How to select all fields from a table, but assign an alias to one field?
Hello.
Faced such a problem. From the table, you need to get all the fields and all the values \u200b\u200bof the fields, but assign an alias to one field. How to do it?
I tried this:
But I only select the id, name field and the value goes as a separate field with the same value as the name value. SELECT *, name AS value FROM table
Answer the question
In order to leave comments, you need to log in
"select * from" is better not to use. no orm generates such requests. you need to choose no more than the required amount of data. therefore Yerlan's answer is final.
Are there no synonyms in MySQL?
CREATE SYNONYM [dbo].[Place] FOR [Videoteq].[dbo].[Storage]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question