anggwaponi Posted December 3, 2008 Share Posted December 3, 2008 hello all i would like to inquire or ask an assistance how to queries two (2) tables with the same number of fields, as well, the same header (did i say the right word) but has different contents?its like table GardenA and GardenB ... the main query i would like to acquire is the column name emailaddress.i want to find out if the email addresses in GardenA is not present in GardenB ...it just happened that i want to send an email to those email addresses that has not yet been send yet (even once) any messages in both tables.hope i can be enlighten :(Sad cheers! Link to comment Share on other sites More sharing options...
jeffman Posted December 3, 2008 Share Posted December 3, 2008 SELECT emailaddressFROM GardenAUNION SELECT emailaddressFROM GardenB The UNION command automatically excludes duplicates. Link to comment Share on other sites More sharing options...
anggwaponi Posted December 4, 2008 Author Share Posted December 4, 2008 SELECT emailaddressFROM GardenAUNION SELECT emailaddressFROM GardenB The UNION command automatically excludes duplicates hello Dad Deirdre and good day once again is the command or syntax u gave only shows the result by way of comparing the two tables without altering or changing the table? sorry to ask but i'm a little bit worried of the word UNION between the line since it might affect the whole table.i just want to make a query and not to change. and i don't want my colleagues to be mad at me since i have done sumfing on it (hope u understand what i mean) cheers! Link to comment Share on other sites More sharing options...
jeffman Posted December 4, 2008 Share Posted December 4, 2008 Correct. You are safe. UNION connects results, not data.But if you have any doubts, do what I always do. Create some temporary tables and test your commands on them. You should be doing this already. Link to comment Share on other sites More sharing options...
Synook Posted December 5, 2008 Share Posted December 5, 2008 SELECT queries never modify data. Link to comment Share on other sites More sharing options...
anggwaponi Posted December 5, 2008 Author Share Posted December 5, 2008 Correct. You are safe. UNION connects results, not data.But if you have any doubts, do what I always do. Create some temporary tables and test your commands on them. You should be doing this already. thanks Dad Deirdre i'm alwys glad that their's a forum like here in w3schools since it surely helps a lot.happy weekend guys Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.