L
L
lemonlimelike2018-01-26 23:40:41
MySQL
lemonlimelike, 2018-01-26 23:40:41

Is it possible to change the field name in a query for a selection, only for this query?

Here is a request

SELECT t1.image,t2.image FROM matches INNER JOIN teams AS t1 ON t1.name = matches.name_one INNER JOIN teams AS t2 ON t2.name = matches.name_two

I select two fields, t1.image and t2.image
But they are displayed with the same names, respectively.
5a6b921f72bfc609399594.jpeg
And how can we add some numbers or letters to the selections so that they are different?
PS type as avg operator

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
1001001, 2018-01-26
@lemonlimelike

SELECT t1.image as myname1 ,t2.image as myname2 FROM ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question