database join

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
vijayanand16
Forum Newbie
Posts: 12
Joined: Fri Jan 30, 2004 4:57 pm

database join

Post by vijayanand16 »

two tables are realted by the column id in each of the tables.I want to select only rows from A that are not in table B.How?
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

SELECT [fields] FROM table1 LEFT JOIN table2 ON table1.id = table2.id

filter from there.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Can't remember exactly if this is in here but it's always worth a read anyway.

PS: this is a database topic.
Post Reply