I`m suck on joining 2 seperate tables together, i need to display all records which country is 'ES' from (Houses) and all of the other table ( rentals ).
One is a new table from another company and one is an existing table so i need to display details from both tables, this is why i need to join the tables for the query.
In order to combine information from two tables, you need something to connect the two - a house must know its rental id, or a rental must know its house id. To ask my question in another manner, how would you, as a human, make the connection between the two tables.
As a Human? I am paying attention moron..... i mean Mordred, I`m only asking how i can display details from 2 tables, i dont know to to connect to 2 tables hence my post,
It is entirely possible, but I think your attitude just waved goodbye to any chance of getting help.
Impressively, you still didn't answer the question he asked.
To make it simpler, if I had a table with user details, and a table about books they might have written, I could have:
user
------
id
name
email
books
-------
id
author
title
In the books table, 'author' would be the same as the 'id' field in user. Get it? You need some way of telling a database about the relationship between two tables in the data itself before you can join them together.
I think we have crossed wires here and i may have used the incorrect term join tables, none of the tables refer to each other they both contain totally different properties.
I need to query which will find and display all properties in rentals and all properties in houses which has a value of 'ES'
for example something like this but this doesn`t work
SELECT *
FROM Houses, rentals
WHERE ( Houses.Country = 'ES' and rentals.area = 'ES' );
so if there were 30 properties in TABLE HOUSES with the country field set at 'ES' and 24 properties in RENTALS TABLE with the area field set at 'ES' then the query would say 54 found.