If I have a database(sakila) with multiple tables, and I want to query multiple columns that relate to each other do I need to use keywords like
SELECT city.city, actor.first_name, actor.last_name
FROM city, actor, staff, address, inventory, film_actor, store
WHERE city.city_id = address.city_id AND
address.address_id = staff.address_id AND
staff.staff_id = store.store_id AND
store.store_id = inventory.store_id AND
inventory.film_id = film_actor.film_id AND
film_actor.actor_id = actor.actor_id
or can I just select them without linking the keys together like this:
SELECT city.city, actor.first_name, actor.last_name
FROM city, actor
EDIT:
So, since I want to see which cities the actors are from, I should use an inner join because a cross join will just match every city to every actor regardless if they actually relate?