This might be a newbie question, I have the following 2 tables, each table contains 2 fields:
table1---------------table2
field1 field2----------field3 field4
1a --- 1b------------- 1c-- 1d
2a ----2b------------- 2c-- 2d
the 2 tables have no relationships and no indices. (no primary keys)
what I want to do is to join the 2 tables using sql.
so i have
SELECT table1.field1,table1.field2,table2.field1,table2.field2,
FROM table1,table2
however this query returns all possible combinations.
The data on both tables are in correct sequence. so I want the resulting table to be like:
field1 field2 field3 field4
1a --- 1b--- 1c-- 1d
2a ----2b--- 2c-- 2d
I am running out of ideas. Hope someone can help me with this.
Also, is there a way to add a column to this new table to number (or primary key autonumber) each row.
thanks.
table1---------------table2
field1 field2----------field3 field4
1a --- 1b------------- 1c-- 1d
2a ----2b------------- 2c-- 2d
the 2 tables have no relationships and no indices. (no primary keys)
what I want to do is to join the 2 tables using sql.
so i have
SELECT table1.field1,table1.field2,table2.field1,table2.field2,
FROM table1,table2
however this query returns all possible combinations.
The data on both tables are in correct sequence. so I want the resulting table to be like:
field1 field2 field3 field4
1a --- 1b--- 1c-- 1d
2a ----2b--- 2c-- 2d
I am running out of ideas. Hope someone can help me with this.
Also, is there a way to add a column to this new table to number (or primary key autonumber) each row.
thanks.
Last edited: