Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Joining two tables

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
Hi all!

I am new to Mysql. I have two tables say table1 and table 2.

both have an field name id. I need all ids from table1 thats not in table 2.

i tried something like this in mysql ..

select table1.id from table1 where table1.id =! table2.id;

error message unknow where clause table2

didn't work ...

then i tried something like this ....

select t1.id from table1 AS t1,table2 AS t2
where t1.productid != t2.productid;

didn't work .....asked me to check the mysql manual and server version .....

server version : 4.0.12-log
client version : 3.23.33

Any help will be greatly appreciated.

Thanks

 
Thank you very much sleipnir214.

Got sick last week.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top