MySQL query of 2 tables [duplicated]

-2

I have the client table:

id nombre idCiudad

The city table:

id nombre

How can I make a selection so that it shows me everything in the client table but instead of taking me out the idCiudad, show me the name of that city directly?

Thanks in advance.

    
asked by Ariishiia 30.04.2017 в 21:34
source

1 answer

-1

You can make a INNER JOIN :

SELECT ciudad.nombre FROM ciudad INNER JOIN cliente ON cliente.id = ciudad.id
    
answered by 30.04.2017 / 21:41
source