1
I have the table address
where do I select:
SELECT street, number, city_id,town
FROM address
WHERE address_id = :address
And on the table city
have the city_id
and I have the link. I need to get this link in my select. How can I do?
1
I have the table address
where do I select:
SELECT street, number, city_id,town
FROM address
WHERE address_id = :address
And on the table city
have the city_id
and I have the link. I need to get this link in my select. How can I do?
2
SELECT
street,
number,
city.city_id,
town,
link
FROM
address
INNER JOIN city ON city.city_id = address.city_id
WHERE
address.id = : address
Thanks, it worked!
It is we that fly.
Browser other questions tagged database
You are not signed in. Login or sign up in order to post.
Related: What is the difference between INNER JOIN and OUTER JOIN?
– Jéf Bueno